Skip to content

Instantly share code, notes, and snippets.

@rgergo67
Created September 24, 2016 21:42
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 rgergo67/6c214c7e6df2413266de401ba276ff52 to your computer and use it in GitHub Desktop.
Save rgergo67/6c214c7e6df2413266de401ba276ff52 to your computer and use it in GitHub Desktop.
htaccess no www
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment