[thelist] redirect home or home/ to home/index.php

Viggie viggie at viggie.com
Fri Dec 14 21:45:50 CST 2012

To redirect nothing after domain name (^$) to index.php, the rule will be

RewriteRule ^$ index.php [R=301,L]

Actually doing the opposite - redirecting index.php to just the domain 
name - will cause endless loop.

But the question remains. Why should this redirect happen?  If it is for 
SEO purposes, then search bots evolved much over the years, they aren't 
too dumb now-a-days.  Also canonical url will server the purpose well.  
If it is for stats, then again there are more ways to come around this 
than forcing a redirect.

However some webservers were set very differently & the above simple 
rule may not work.  Then it is best to work with the host maintenance.

Hope this helps!

Freelance Web Developer

More information about the thelist mailing list