I've set a redirect rule in htaccess - but instead of redirecting the url to the right scheme (https) it first redirect to http. for example:
RewriteRule ^prefixurl/(aaa|bbb|ccc)/suffixurl$ prefixurl/ddd/suffixurl [R=301,QSA,L]
What happens is I get from :
--> (redirects to)
--> (2nd redirect to)
(there is nginx server in front of Apache with directive to move all non https back to https...)
Why the redirect to http takes place ? any way to fix it ?
您可以使用此单一规则来获取重定向并在重定向 URL 中获取https://
:
RewriteRule ^prefixurl/(aaa|bbb|ccc)/suffixurl$ https://%{HTTP_HOST}/prefixurl/ddd/suffixurl [R=301,NC,L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.