Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help fine tuning already working rewite for ssl

Status
Not open for further replies.

onejz

Technical User
May 6, 2007
1
US
hi, i need some help fine tuning rewrite for my ssl. what i have now has everything going to rewritten but the problem is ssl takes a toll on site performance. i need to set it so that only /members/login /members/account and /purchase get rewritten https, which will be easy enough. but i need everything that isn't those two to be http, and the problem is once the url goes https, its staying https for everything. does anybody have any help on how i can tune the following rules so that after users are done on the three that i am going to send them to on https, i can get the url rewritten back to http.

with these rules, it rewrites from https to http when going from /member/login to /member, and then rewrites to https when going to /purchase and /member/account, but then doesn't rewrite back to http after; only /member/signup to /member rewrites back. any suggestions?

RewriteCond %{HTTP_HOST} ^site.com$ [NC]
RewriteRule ^(.*)$ [R=301,L]

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/member(.*)$ [L,R]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/purchase(.*)$ [L,R]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/member/account(.*)$ [L,R]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top