Created
July 7, 2014 11:22
-
-
Save dmitrymomot/c0fd8c6e0bbd7f64dbe0 to your computer and use it in GitHub Desktop.
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
### redirect from www to non-www | |
# ---------------------------------------------------------------- | |
# Options +FollowSymLinks | |
# RewriteEngine On | |
# RewriteCond %{HTTP_HOST} ^www.site.com$ | |
# RewriteRule (.*) http://site.com/$1 [R=301,L] | |
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/ | |
# RewriteRule ^index\.html$ http://site.com/ [R=301,L] | |
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ | |
# RewriteRule ^index\.php$ http://site.com/ [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment