Link to home
Start Free TrialLog in
Avatar of kiqkinas
kiqkinasFlag for United States of America

asked on

Apache rewrite rule https to http if filename is not in url

Apache rewrite rule https to http if filename is not in url

All links to secure pages are in this form:
https://www.mysite.com/Merchant2/merchant.mvc?Session_ID=fc195fcddb158f3a6e28e4cadccd5ebf&Screen=OINF&Store_Code=KK2003

If the file merchant.mvc is NOT in the URL I need to direct links back to non secure pages.

Why does'n this work in my .htaccess file?

# If Secure and Not merchant.mvc redirect to non-secure pages
RewriteCond %{HTTPS} ^443$
RewriteCond %{REQUEST_URI} !^/(merchant\.mvc)$
RewriteRule (.*) http://www.mysite.com/$1 [R=301,L]
ASKER CERTIFIED SOLUTION
Avatar of Jason Minton
Jason Minton
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial