htaccess SSL 重定向
我试图仅对几个页面进行 ssl 重定向,例如 viewcart、checkout,当我尝试应用此规则时,它给我服务器 500 错误。
以下是我在 htaccess 中使用的行,
RewriteCond %{HTTPS} on [s=2]
RewriteRule ^viewcart$ https://%{HTTP_HOST}/viewcart [R,L]
RewriteRule ^checkout$ https://%{HTTP_HOST}/checkout [R,L]
提前感谢您的帮助。希望尽快解决。
谢谢 p先生
I am trying to do ssl redirection for few pages only e.g. viewcart, checkout and when I try to apply this rule it gives me server 500 error.
Below is the lines I am using in my htaccess
RewriteCond %{HTTPS} on [s=2]
RewriteRule ^viewcart$ https://%{HTTP_HOST}/viewcart [R,L]
RewriteRule ^checkout$ https://%{HTTP_HOST}/checkout [R,L]
Thanks for help in advance. hope to get it resolved soon.
Thanks
mr p
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
s
不是 RewriteCond 指令的有效标志您可以通过以下方式实现相同的效果
s
is not a valid flag for the RewriteCond directiveYou can achieve the same with below