Created
December 8, 2014 18:01
-
-
Save ww24/60482d961abbf3e7a6a9 to your computer and use it in GitHub Desktop.
redirect naked domain
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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