Friday, December 05, 2008
How to remove www from your URL with mod_rewrite - Yoast - Tweaking Websites
To remove or add "www" to your domain name just use the following code in your .htaccess file:Remove www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Add www:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule (.*) http://www.example.com$1 [R=301]
How to remove www from your URL with mod_rewrite - Yoast - Tweaking Websites
Article Link posted by Edward at 2:15 PM