Redirect www to non-www URLs

If you want redirect users from www to a plain, non-www domain, insert this configuration in your .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] [...]

Redirect non-www to www URLs

If you want redirect users from a plain, non-www domain to a www domain, insert this configuration in your .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^www\. [NC] [...]