Im trying to redirect all mydomain.com to www.mydomain.com to avoid SEO double indexing issues. Here is the code in my .htaccess file. Can anyone tell me where Im going wrong?
if I try to enter in the rewriterule my page will not load no matter what url I try.
RewriteEngine On<br />
RewriteCond %{HTTP_HOST} !^www\.thinkoutsidetheshowroom\.com [NC]<br />
RewriteRule ^(.*)$ http://www.thinkoutsidetheshowroom.com/$1 [L,R=301]<br />
RewriteRule ^$ http://www.thinkoutsidetheshowroom.com/index.php [L,R=301]<br />
DirectoryIndex index.html index.php<br />
<IfModule mod_rewrite.c><br />
RewriteEngine on<br />
# Some hostings require RewriteBase to be uncommented<br />
# Example:<br />
# Your store url is http://www.yourcompany.com/store/cart<br />
# So "RewriteBase" should be:<br />
# RewriteBase /store/cart <br />
RewriteBase /<br />
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$<br />
RewriteCond %{REQUEST_FILENAME} !-f<br />
RewriteCond %{REQUEST_FILENAME} !-d<br />
RewriteRule . index.php?sef_rewrite=1 [L,QSA]<br />
<br />
RewriteCond %{REQUEST_FILENAME} .*\/catalog\/.*<br />
RewriteCond %{REQUEST_FILENAME} -d<br />
RewriteCond %{REQUEST_FILENAME}/index.html !-f<br />
RewriteRule . index.php?sef_rewrite=1 [L,QSA]<br />
<br />
</IfModule>