I need to redirect one specific page of an OpenCart site to HTTPS. Tried the following rewrites so far, none of them work. The first 2 have no effect, and the 3rd one produces a 500 error. I've scoured at least 30 sites with examples, but none of them seem to work. Help please! If it makes any difference, the checkout template file is in a subfolder /checkout/ - if I need to place an .htaccess file there separately, I can do that too. All I want is: https://www.mysite.com/index.php?route=checkout/specialcheckout Help??? RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} http://www.mysite.com/index.php?route=checkout/specialcheckout RewriteRule ^(.*)$ https://www.mysite.com/index.php?route=checkout/specialcheckout [R,L] RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/checkout/?.*$ RewriteCond %{REQUEST_URI} ^/checkout/specialcheckout.*$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} !=on RewriteCond %{REQUEST_URI} http://www.mysite.com/index.php?route=checkout/specialcheckout RewriteRule ^https://www.mysite.com/index.php?route=checkout/specialcheckout
Do you want to when visitor access "http://www.mysite.com/index.php?route=checkout/specialcheckout", they will be redirected to "https://...." ?
Yes, that's exactly what I want to do - this is the page where customers enter their credit card info, and it should definitely be httpS. So, regardless of how the visitor gets to that page - through the shopping cart, or saved link, etc. - I want it to transform to httpS every time. Thank you in advance for any ideas.
Add the line below in your .htaccess RewriteRule http://www.mysite.com/index.php?route=checkout/specialcheckout https://www.mysite.com/index.php?route=checkout/specialcheckout [R=301,L] Code (markup): Hope that help