From kodeboard, 4 Years ago, written in Apache.
Embed
  1. #redirect www.example.com to example.com
  2. RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  3. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

You must login to reply or comment on this code.