To redirect from www to non-www, edit your .htaccess file suc as:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
and to redirect from non-www to wwww:
RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Hi thanks for dropping by. Please share the content if you think there is someone who will appreciate it.