Files
template-for-verstka/.htaccess

14 lines
500 B
ApacheConf
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<IfModule mod_rewrite.c>
# Редирект: ...// -> .../
RewriteCond %{REQUEST_URI} (.*)\/\/$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/%1/ [R=301,L]
# Редирект: с www -> без www
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
# Редирект: HTTP -> HTTPS
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>