directoryindex for index.php

Alles, was den Apache betrifft, kann hier besprochen werden.

directoryindex for index.php

Postby grNadpablc » 17. November 2016 16:34

how do I get Apache httpd.conf to invoke my (localhost) index.php in my htdocs and subfolders when index.html is not present?

Here is the http.conf entry in my windows10 on Dell Inspiron laptop;
C:\xampp\apache\conf\httpd.conf
Code: Select all
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>


My production host does respect the index.php default so I would prefer that my localhost did as well
grNadpablc
 
Posts: 3
Joined: 17. November 2016 16:10
XAMPP version: 3.2.2
Operating System: windows 10

Re: directoryindex for index.php

Postby Nobbie » 17. November 2016 23:12

I would try to change the order of the files, first index.html and after index.php
Nobbie
 
Posts: 13171
Joined: 09. March 2008 13:04

Re: directoryindex for index.php

Postby grNadpablc » 18. November 2016 16:05

That worked. But I wonder if this was not a cache issue since after the change you recommended, I restored the DirectoryIndex back to starting with index.php and that worked too.

So, if it is a cache issue, was it a cache that invoked the index.html as default yesterday or is it the cache today that invokes the index.php as default? (I have cleared the cache in both cases).

I suppose I could provide the complete path just to be safe. But inquiring minds want to know.
grNadpablc
 
Posts: 3
Joined: 17. November 2016 16:10
XAMPP version: 3.2.2
Operating System: windows 10


Return to Apache

Who is online

Users browsing this forum: No registered users and 23 guests