My .htaccess file includes a section that looks like this (Note: domain names have been changed to protect the innocent):
Code:
# Permanently Moved
Redirect 301 /index.html http://www.mydomain.com/index.php
Redirect 301 /index.htm http://www.mydomain.com/index.php
The trouble with this is that when someone enters
http://www.mydomain.com, they are automatically redirected to
http://www.mydomain.com/index.php (and that's what shows up in their browser's address bar). Largely for aesthetic reasons, I'd rather do this instead:
Code:
# Permanently Moved
Redirect 301 /index.html http://www.mydomain.com/
Redirect 301 /index.htm http://www.mydomain.com/
Unfortunately, I think the latter code results in a bad loop. Any solutions to this dilemma? I really prefer everything to result in http:/www.mydomain.com showing up in the user's address bar no matter what. It just looks cleaner to me. I have old links to index.htm and index.html that I would love to have resolve to the root directory of the website.