【发布时间】:2015-03-05 01:32:59
【问题描述】:
这是我的 conf 文件中的内容:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^test\.old\.com$ [NC]
RewriteCond %{HTTPS} on
RewriteRule ^(.*)$ https://test-new.com$1 [QSA,R=301,L]
RewriteCond %{HTTP_HOST} ^test\.old\.com$ [NC]
RewriteRule ^(.*)$ http://test-new.com$1 [QSA,R=301,L]
当我转到test.old.com 时它会重定向,但当我尝试https://test.old.com 时不会发生重定向
如何将 https 请求重定向到 URL 中带有 https 的新域?
【问题讨论】:
标签: apache mod-rewrite redirect ssl https