Skip to content

Instantly share code, notes, and snippets.

@alexander-young
Created May 12, 2017 15:24
Show Gist options
  • Save alexander-young/8c071ce395cd0ee90183e5a047641acf to your computer and use it in GitHub Desktop.
Save alexander-young/8c071ce395cd0ee90183e5a047641acf to your computer and use it in GitHub Desktop.
redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,NC,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment