Skip to content

Instantly share code, notes, and snippets.

@sebastiandedeyne
Created October 23, 2014 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastiandedeyne/3adadb169e92c79fa843 to your computer and use it in GitHub Desktop.
Save sebastiandedeyne/3adadb169e92c79fa843 to your computer and use it in GitHub Desktop.
Htaccess www to non-www
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment