Choosing preference between index.html & default.html etc

thedjmixman

Registered
Apr 27, 2004
2
0
151
Kent, UK
I thought that I saw this quite a while ago???, but cant find it now that I need it lol.

Is it possible to change the order of which the server looks for the default page? I have a certain site that requires default.php to be the home page, but I also need index.php to be in the same directory ;)

Many thanks,
Chris
 

PWSowner

Well-Known Member
Nov 10, 2001
2,948
4
343
ON, Canada
For server wide changes, you can modify the httpd.conf file. The part to modify looks something like:
<IfModule mod_dir.c>
DirectoryIndex index.pws index.html index.wml index.cgi index.pl index.ms index.shtml index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml index.htm default.htm default.html home.htm home.html
</IfModule>


It won't be quite the same since mine is modified. The file is normally in the /usr/local/apache/conf/ directory.
 

B12Org

Well-Known Member
Jul 15, 2003
692
1
168
Seattle Washington
cPanel Access Level
Root Administrator
Originally posted by thedjmixman
I thought that I saw this quite a while ago???, but cant find it now that I need it lol.

Is it possible to change the order of which the server looks for the default page? I have a certain site that requires default.php to be the home page, but I also need index.php to be in the same directory ;)

Many thanks,
Chris
For server wide changes, place that into your httpd.conf file. For domain or folder only level changes, place that into your htaccess file.

That "should" work.