Created
November 7, 2011 09:41
-
-
Save kriskhaira/1344556 to your computer and use it in GitHub Desktop.
To redirect all users to access the site WITHOUT the 'www.' prefix
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
# NO WWW - taken from Drupal 7's .htaccess | |
# To redirect all users to access the site WITHOUT the 'www.' prefix, | |
# (http://www.example.com/... will be redirected to http://example.com/...) | |
# -------------------------------------------------------------------------------------------------- | |
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] | |
RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment