Add the following to the websites root .htaccess file.
Redirect to non-www version:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ http://yourwebsite.com/$1 [L,R=301,NC]
</IfModule>

Redirect to www version:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ http://www.yourwebsite.com/$1 [L,R=301,NC]
</IfModule>

Pin It on Pinterest

Share This