Skip to content

Instantly share code, notes, and snippets.

@ww24
Created December 8, 2014 18:01
Show Gist options
  • Save ww24/60482d961abbf3e7a6a9 to your computer and use it in GitHub Desktop.
Save ww24/60482d961abbf3e7a6a9 to your computer and use it in GitHub Desktop.
redirect naked domain
# BEGIN Redirect naked domain
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^(example\.com|example\.org)$
RewriteRule .* http://www.example.com/$0 [QSA,R=301,L]
</IfModule>
# END Redirect naked domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment