What I’m trying to do is serve the folder /soap OR pages that have /?p=uploads in title over http, the rest of the site over https.
RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} (^|&)(p=uploads)(&|$) [NC,OR]
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^ - [E=IS_HTTP:1]
RewriteCond %{SERVER_PORT} 443
RewriteRule ^soap/?(.*) http://www.example.com/soap/$1 [R,L]
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/soap
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
It seems to work for the soap folder but not pages with /?p=uploads
Here is a way to do it:
All URLs are redirected to HTTPS, except those that have
/soapor/?p=uploads