繁体   English   中英

htaccess 重定向 301 相对路径,将 url 从 https 重定向到 http 而需要 Z5E656C50BADE00D81C

[英]htaccess redirect 301 relative path , redirects the url from https to http while https is required

我的 htaccess 中有简单的线条

Redirect 301 /something/ /blog/something/

如果我点击https://www.example.com/something/

它重定向到http://www.example.com/blog/something/

我想要https://www.example.com/something/https://www.example.com/blog/something/

它应该使用 https 而不是 http

尝试这个

RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} blog RewriteRule ^(.*)$ https://www.yourdomain.com/blog/$1 [R,L]

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM