Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Sign Up

Редирект с https на https

Recommended Posts


Вот, что у меня в htaccess:

RewriteEngine On
RewriteBase /

#Редирект с www to non-www(https)
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
#Редирект с http to https
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/ 
RewriteRule ^index\.html$ / [R=301,L] 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ 
RewriteRule ^index\.php$ / [R=301,L]
RewriteCond %{QUERY_STRING} ^route=common/home$
RewriteRule ^index\.php$ https://%{HTTP_HOST}? [R=301,L]

RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L]
RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Больше там ничего нет.

Я, в принципе, не уверен, что он правильный (может кто подправит).

проверял здесь http://www.prcy-info.ru/index.php/redirect-checker 


Ссылка: https://мойсайт.ком/каталог

Обнаружен 301 редирект на URL: https://мойсайт.ком/каталог 

Это ТАК должно работать?


Ссылка: https://www.мойсайт.ком/каталог/

Обнаружен 301 редирект на URL: https://мойсайт.ком/каталог/

В других случаях слеш убирается, почему не убирается тут?





Edited by yurabr
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.