/ Published in: Apache
remove the www usually located at the beginning of the url :
www.url.com -> url.com
http://www.url.com/file.html -> http://url.com/file.html
http://www.url.com/directory/file.html -> http://url.com/directory/file.html
etc...
www.url.com -> url.com
http://www.url.com/file.html -> http://url.com/file.html
http://www.url.com/directory/file.html -> http://url.com/directory/file.html
etc...
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ http://example.com$1 [R=301,L]