Subdomain won't load index.html

D-Spayre

Verified User
Joined
Dec 30, 2012
Messages
5
Hi,

When I create a subdomain it creates it and creates the default index.html file. Which is great.
But when I go to view the subdomain I get:

Not Found

The requested URL /index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


It's looking for index.php not index.html. If I rename it to php it's fine or if I create an .htaccess file it's fine.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.ca [nc]
rewriterule ^(.*)$ http://www.domain.ca/$1 [r=301,nc]


But how do I get it to read index.html also without creating a .htaccess file or renaming the HTML file to PHP?
The domain works fine, it uses my index.php file and if it's not there it will use the index.html file.

Thanks for your help...

D-Spayre
 
There is no reason it would force a index.php. What do you use for DirectoryIndex?
 
Hi,
HTML:
<IfModule dir_module>
    DirectoryIndex index.php index.html  index.htm index.shtml index.php5 index.php4 index.php3 index.phtml index.cgi
</IfModule>

The domain works fine, reads both php or html it's just when a subdomain is created. :(

Thanks
 
Well it should be prefering index.php over index.html but not forwarding it to index.php. Do you have any redirects in place that would be forwarding it to index.php? Check for any .htaccess files, especially in the parents folders.
 
Well it should be prefering index.php over index.html but not forwarding it to index.php. Do you have any redirects in place that would be forwarding it to index.php? Check for any .htaccess files, especially in the parents folders.

Wow that was it...
Thanks very much scsi.

How do I fix it so that it will also read the html file also?

Thanks again...
 
Back
Top