Forum Moderators: phranque

Message Too Old, No Replies

Make any page your homepage?

make webpage homepage

         

matthewamzn

8:13 am on Aug 8, 2005 (gmt 0)

10+ Year Member



How can I make a page on my site my homepage? For instance how could I make www.example.com/forums/index.php my homepage rather than www.example.com/index.html.

akmac

4:08 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



My understanding is that you cannot make a page in a subdirectory your main page without a redirect, and redirecting your home page isn't good. If you still want to, use a 301 redirect.

matthewamzn

4:19 pm on Aug 8, 2005 (gmt 0)

10+ Year Member



How would I make something like www.example.com/play.php my homepage?

MatthewHSE

6:26 pm on Aug 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



All this depends on what options your hosting company gives you. If you're on an Apache server and have access to your httpd.conf file, you can configure your server to make any file name the index page for a directory. Or, you could use a 301 redirect in your .htaccess file, which is probably what I would opt for.

Another idea for your first question would be to pull the /forums/index.php page into your index.html page via SSI. To do this, just edit your .htaccess file to parse .html files for SSI, then use the following for the entire HTML of your /index.html page:

<!--#include virtual="/forums/index.php"-->

In this case, there may be a slight search engine risk for duplicate content, but I doubt it. I've never seen any evidence that duplicate content on the same domain does much to your rankings. Another caution is that your forum software will need to be using absolute links instead of relative, or none of the links will work once you pull the forum index page onto your root-level index page.

encyclo

6:30 pm on Aug 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are on a server running Apache, then you can use the DirectoryIndex directive:

DirectoryIndex play.php index.php index.html index.htm

Apache will then look for the file "play.php" when a request is made for the root directory, or if play.php doesn't exist, it will loo for the others in the list in turn.