Last active
February 2, 2016 20:34
-
-
Save akanik/3d1d2bb7006b823f0c38 to your computer and use it in GitHub Desktop.
.htaccess redirect www
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
# To redirect all users to access the site WITHOUT the 'www.' prefix, | |
# (http://www.example.com/... will be redirected to http://example.com/...) | |
# Make sure to replace example.com with your own site name | |
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] | |
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment