Code for htaccess to create redirect from site's url with www to site's url without www:
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]Source: http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
No comments:
Post a Comment