Getting to HTTPS is not the issue but getting back to HTTP after the checkout process.
- Code: Select all
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^purchase/.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !purchase/.*$
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php [L]
What I cannot understand is how to always make sure that index.php is the file that is hit upon the rewrite rule as that is the way the MVC frameworks typically work.
I basically want every page but the pages served by the "purchase" controller to be HTTP and all "purchase" pages to be HTTPS. Any guidance would be greatly appreciated. I have tried 5-10 examples outlined in various posts on this site.