Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Created December 6, 2013 15:31
Show Gist options
  • Save jlittlejohn/7826544 to your computer and use it in GitHub Desktop.
Save jlittlejohn/7826544 to your computer and use it in GitHub Desktop.
HTACCESS: Remove www from the domain
RewriteCond %{HTTP_HOST} ^www\.domainname\.com$ [NC]
RewriteRule ^(.*)$ http://domainname.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment