Forum Moderators: phranque
I installed zen-cart and of course don't want to Rewrite every .php to .html So, as a quick fix, I just put another .htaccess in the zen-cart main directory with just a simple "RewriteEngine Off" command. The problem is it's written to run under HTTP and I want to keep the connection secure with HTTPS.
How can I turn/keep the "RewriteEngine On" and just have the Rewrite to HTTPS rule?
Is this allowed (will this actually work):
RewriteEngine Off
RewriteEngine On
RewriteCond %{SERVER_PORT}!^443$
RewriteRule ^(.*)$ [mywebdomain.com...] [R,L]
Thanks in advance!
~Mike
I suspect that what you want/need to do is to add an exclusion (using RewriteCond) to this rule, so that no URLs referencing the cart will invoke the rule. Assuming that the cart stuff is located in /cart and in directories below /cart/, you'd just add:
RewriteCond %{REQUEST_URI} !^/cart/
Jim
And, by the way, Jim... I notice you post a LOT on this forum and I have to tell you that there are a LOT of people here like me who would be COMPLETELY LOST without your input... and I just wanted to say thanks again for all your contributions. I no doubt speak for everyone when I tell you that we are all very grateful.
Thanks again!
~Mike