Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
ISAPI_Rewrite 2.x
 Helicon Tech : ISAPI_Rewrite 2.x
Subject Topic: Force SLL for a folder Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
BSolveIT
Newbie
Newbie


Joined: 26 June 2007
Location: United Kingdom
Online Status: Offline
Posts: 13
Posted: 01 July 2010 at 11:14am | IP Logged Quote BSolveIT

Hi!

I want to force SLL for requests to a certain folder, but I want to force non SSL for any other requests.

I have the following to force the SSL on my forms folder:

RewriteCond %HTTPS (?!on).*
RewriteRule /forms(/.*)? https\://www.equity-release-centre.co.uk/forms$1 [I,RP]

My problem is I can't figure out how to force non-SSL to all other requests except one's to that folder (forms).  I would be really grateful for help here, I'm going mad.  hehe

Regards
Mark



__________________
Search Engine Optimisation
Back to Top View BSolveIT's Profile Search for other posts by BSolveIT Visit BSolveIT's Homepage
 
Anton
Admin Group
Admin Group


Joined: 30 January 2007
Location: Ukraine
Online Status: Offline
Posts: 10489
Posted: 02 July 2010 at 3:36am | IP Logged Quote Anton

The config should be:

RewriteCond %HTTPS (?!on).*
RewriteRule /forms(/.*)? https\://www.equity-release-centre.co.uk/forms$1 [I,RP]

RewriteCond %HTTPS (?!off).*
RewriteRule /(?!forms.*)(.*) http\://www.equity-release-centre.co.uk/$1 [I,RP]

__________________
Regards,
Anton
Back to Top View Anton's Profile Search for other posts by Anton
 
BSolveIT
Newbie
Newbie


Joined: 26 June 2007
Location: United Kingdom
Online Status: Offline
Posts: 13
Posted: 02 July 2010 at 4:07am | IP Logged Quote BSolveIT

Brilliant!  I had to put them in the opposite order, and now it works perfectly! 

RewriteCond %HTTPS (?!off).*
RewriteRule /(?!forms.*)(.*) http\://www.equity-release-centre.co.uk/$1 [I,RP]

RewriteCond %HTTPS (?!on).*
RewriteRule /forms(/.*)? https\://www.equity-release-centre.co.uk/forms$1 [I,RP]



__________________
Search Engine Optimisation
Back to Top View BSolveIT's Profile Search for other posts by BSolveIT Visit BSolveIT's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum