Skip to content

Instantly share code, notes, and snippets.

@Victa
Created May 30, 2011 17:41
Show Gist options
  • Save Victa/999208 to your computer and use it in GitHub Desktop.
Save Victa/999208 to your computer and use it in GitHub Desktop.
Remove www in url
RewriteEngine On
RewriteCond %{HTTP_HOST} !^your-site.com$ [NC]
RewriteRule ^(.*)$ http://your-site.com/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment