Last active
September 24, 2018 13:02
-
-
Save Maksclub/3a592045d52e6c21802ff9803cf6eca2 to your computer and use it in GitHub Desktop.
redirect from 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
# Редирект на адреса без www | |
RewriteCond %{HTTP_HOST} ^www.site.ru | |
RewriteRule ^(.*)$ http://site.ru/$1 [R=301,L] | |
# Редирект на адреса без слеша | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} ^(.+)/$ | |
RewriteRule ^(.+)/$ /$1 [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment