我目前使用此代码将 HTTP 重定向到 HTTPS:
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
它正在工作,http://website.com http://website.com被重定向到https://website.com https://website.com,
但是当我不在网站上并尝试去时https://website.com/about https://website.com/about or https://website.com/contact https://website.com/contact我被重定向到https://website.com/index.php https://website.com/index.php
我只能在访问网站时才能访问 /pages。
如何解决这个问题?
我尝试了几个 .htaccess 脚本,但没有一个起作用。
尝试点击http://ndvibes.com/about http://ndvibes.com/about如果您尚未访问该网站,您将被重定向到index.php。
怎么修?谢谢!
这应该效果更好。
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://website.com/$1 [R=301,L]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)