.htaccess mod_rewrite to eliminate non-www domain and index.php

December 25, 2006

#Redirect any bogartcomputing.com request to http://www.bogartcomputing.com
rewritecond %{HTTP_HOST} ^bogartcomputing\.com
rewriterule (.*) http://www.bogartcomputing.com/$1 [R=301,L] 
#Redirect any index.php request to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php /$1 [R=301,L]
#redirect any home/ request to /
RewriteRule ^(.*)home/ /$1 [R=301,L]

Previous post:

Next post: