Friday 7 October 2011

When requesting index.php I get the index.html, why cant I REQUEST the .php even though the html is present?

I am setting up a site on a different ISP to my usual one.



Whenever I request index.php I am served the index.html



Why cant I specifically request the index.php even though the index.html is present?



I do this on my normal ISP and it works fine.



For example I upload a temporary index.html saying site under construction and then remove it when opening the site.



This way I can put in the http://www.domainname.com/index.php and I get the new site, while everyone else get the under construction page of the default index.html



So why on this ISP could it not be working and it is always serving index.html?



(I have tried adding a DirectoryIndex line to the .htaccess but of course all that does is CHANGE the default, which is NOT what I am trying to do here)When requesting index.php I get the index.html, why cant I REQUEST the .php even though the html is present?DirectoryIndex can accept a list of multiple options, i.e.



DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm



So if you want to change the order, and make index.php more important, move it to the first choice, i.e.



DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm



Then, when you upload it, it'll take precedence until removed.
When requesting index.php I get the index.html, why cant I REQUEST the .php even though the html is present?
This looks like a question for your ISP. It depends on the settings of their environment...