R
R
Reiters2020-08-18 19:39:33
htaccess
Reiters, 2020-08-18 19:39:33

.htaccess redirects from https to http and back, what to do?

There is a store on opencart 3.0 with a customized cnc (Seo pro). Redirect to https is connected through the hosting.
To save links from the old site, a list of "hard" 301 redirects of the form was created: (xxx old link with opencart prefix, yyy - new link)

RewriteCond %{QUERY_STRING} ^_route_=xxx$
RewriteRule ^(.*)$ /yyy? [R=301,L]

The redirect works, but there was a problem, an intermediate redirect to http appeared.
It turns out such a chain: link to the old-> link to the new c http-> https-> link with a slash
5f3c037315b94431024861.jpeg

Please help me, how to get rid of this intermediate http-> https redirect?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2020-08-18
@Reiters

Add full address with https and domain.

RewriteCond %{QUERY_STRING} ^_route_=xxx$
RewriteRule ^(.*)$ https://site.ru/yyy? [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question