View Full Version : Change Indexfile For Domain
Wordplay
12-02-2008, 09:59 AM
is it possible to have my server load home.php rather than index.php when people enter the domain name in the address bar?
Dismounted
12-02-2008, 10:16 AM
Yes, you can do this via the web server's config file. For Apache, this file is called "httpd.conf".
Wordplay
12-02-2008, 10:25 AM
thanks for the quick response, but where is that file located?
Dismounted
12-03-2008, 02:16 AM
You will only have access to this file if you control the server. It is usually located in /etc/httpd/conf.
Wordplay
12-03-2008, 10:34 AM
the only folder in my etc folder is a folder with my domain name, in that folder there are the files:
password
quota
shadow
and a folder with a file named info.
SEOvB
12-03-2008, 11:56 AM
login via SSH and do
updatedb
locate httpd.conf
it'll give you some locations for httpd.conf
Digma
12-05-2008, 07:27 AM
Might only work if you have root access to the server.
In some control panels the httpd.conf is also included and can be editted from your browser.
Wordplay
12-05-2008, 12:05 PM
thanks for the replies, but how do i log in via ssh?
(i've never dealt with ssh before).
what would it be labeled if it was in my control panel?
Just create a .htaccess file in your root folder and put this line inside it:
DirectoryIndex home.php
More info on .htaccess: http://www.javascriptkit.com/howto/htaccess.shtml
More info on DirectoryIndex: http://www.javascriptkit.com/howto/htaccess6.shtml
Wordplay
12-06-2008, 09:59 AM
sweet, exactly what i was looking for!
thank you!
Wordplay
12-19-2008, 09:28 AM
Just create a .htaccess file in your root folder and put this line inside it:
DirectoryIndex home.php
More info on .htaccess: http://www.javascriptkit.com/howto/htaccess.shtml
More info on DirectoryIndex: http://www.javascriptkit.com/howto/htaccess6.shtml
there's a little problem with this... that being that it changes that for every directory, and in other directories it no longer looks for the index.htm/index.php file.
anyway to specify it so it only does that for the root directory?
i guess i fixed it by changing it to:
DirectoryIndex home.php index.php index.htm index.html
thanks for the helpful links :).
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.