我正在努力强制使用 HTTPS,如果用户使用的是 HTTP,请重定向用户。出于某种原因,我的重写规则在我的 prod env 上效果很好,但在我的 dev 上效果不佳,这里是:
# Redirect HTTP to HTTPS# redirect all http requests to https
RewriteCond %HTTPS (?!on).*
RewriteCond Host: (.*)
RewriteRule (.*) https\://$1$2 [I,RP]
在 Prod 上效果很好,它重定向了用户。在 Dev 上,它并没有显示这个非常奇怪的页面:
-cache
Content-Type: text/html
Content-Length: 161
Location: https://blahblah.mainblah.com/
<html><body>The requested resource was moved. It could be found here: <a href="https://blahblah.mainblah.com/">https://dev-notebox.intuit.com/</a></body></html>
有没有人看到这个或对这里发生的事情有任何想法/指示?
谢谢