Skip to content

Instantly share code, notes, and snippets.

@brendannee
Created April 17, 2013 23:58
Show Gist options
  • Save brendannee/5408771 to your computer and use it in GitHub Desktop.
Save brendannee/5408771 to your computer and use it in GitHub Desktop.
.htaccess remove www. from domain
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.mysite.com [NC]
RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment