开发者

.htaccess - help with a rewrite rule for ssl

So I've got a website and an SSL certificate. Everything is set up and working, however, both http://example.com/checkout and https://example.com/checkout work. I'm hoping there's a way to write a rule where anything going t开发者_如何学编程o /checkout is rerouted to https.

Ideas?


Try this:

RewriteCond %{HTTPS} off
RewriteRule ^checkout$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜