Redirect WWW to non WWW, for primary domain, and parked domain
I already know basic Redirect www to non-www, using htaccess:
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301] |
but how if we have parked domain too?
I already tried this but its not works, its says "The page isn't redirecting properly"
RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^yourdomain2.com - Domain name registration Resources and Information. This website is for sale! [NC] RewriteRule ^(.*)$ http://yourdomain2.com/$1 [L,R=301] |
please share your knowledge, what is the best way for this?
Rock Bottom Prices on Domains and Website Hosting