View Single Post
Old 12th May 2008, 12:54 PM   #2 (permalink)
MrBen
Munky!
 
MrBen's Avatar
 
Join Date: Sep 2003
Location: nr Woking, England
Posts: 2,582
I do something similar on one of my sites. The following should work. You need to exclude /software/ from the first rewrite. Each rule uses [L] which means last rule - i.e. don't bother processing any more.

Code:
RewriteCond %{HTTPS} !=on
RewriteCond %{REQUEST_URI} !^/software/.*$ [NC]
RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,L]

RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} ^/software/.*$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Ben
__________________
The impossible I can do today, miracles take a little longer

Veterinary Practice Management System by SoftFooding
Internet Data Usage Calculator: Estimate your monthly bandwidth usage for your Internet connection.
Little Red: Nordic Style Rye Bread
MrBen is offline   Reply With Quote