Forum Moderators: phranque

Message Too Old, No Replies

How do browsers determine the homepage?

         

chopin2256

5:02 am on Aug 29, 2005 (gmt 0)

10+ Year Member



This is a really stupid question, but I never actually thought about this until now, when I want to change my homepage, but I can't, since it is dynamic. How do browsers know which file to load show when http://www.example.com/ is typed into a browser? Is the default index.html? What about index.htm, index.php? Are these also defaults?

What if you want your "index.html" page to not be the default homepage...how would you change that? I want a dynamic page to be the default homepage....is the only way to accomplish this through htaccess?

marcs

5:11 am on Aug 29, 2005 (gmt 0)

10+ Year Member



This is defined server-side. With apache, you can set this either in .htaccess or httpd.conf using :

DirectoryIndex

Example :

DirectoryIndex index.shtml index.htm index.html

This would show index.shtml as the index page, if it does't exist, it will use index.htm instead, then index.html.

Marc

kaled

9:17 am on Aug 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to clarify........

The index page (not homepage) of a directory is defined by the server. The browser merely displays the data supplied to it and follows redirect instructions (if any).

Kaled.

txbakers

12:08 pm on Aug 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



any file can be the index file.