Skip to content

Instantly share code, notes, and snippets.

@timonweb
Created November 19, 2012 12:45
Show Gist options
  • Select an option

  • Save timonweb/4110449 to your computer and use it in GitHub Desktop.

Select an option

Save timonweb/4110449 to your computer and use it in GitHub Desktop.
Generic htaccess redirect www to non-www
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@saosangmo

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment