.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]
精彩评论