Skip to content

Instantly share code, notes, and snippets.

@tribulant
Last active August 29, 2015 14:22
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 tribulant/a3b71077f95e643069c7 to your computer and use it in GitHub Desktop.
Save tribulant/a3b71077f95e643069c7 to your computer and use it in GitHub Desktop.
.htaccess redirect to non-www
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment