Forum Moderators: phranque

Message Too Old, No Replies

.htaccess file to change homepage

         

matthewamzn

6:31 pm on Dec 20, 2006 (gmt 0)

10+ Year Member



My current homepage works like this:
http://www.example.com/index.php

I want to change it to this:
http://www.example.com/forums/index.php

I tried adding an .htaccess file with this in it:
DirectoryIndex forums/index.php

This changed the homepage. But if someone goes directly to 'http://www.example.com/forums/index.php' they get a forbidden message.

Am I missing something in the .htaccess file?

RonPK

10:48 pm on Dec 20, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Maybe this is more appropriate:

RedirectPermanent / http://www.example.com/forums/
RedirectPermanent /index.php http://www.example.com/forums/

That should redirect all requests for / and /index.php to the forums. It also sends a status code 301 to the client, indicating that this is a permanent redirect.