Force https except for one directory

.htaccess, https, ssl

Solution

This should get what you need.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !domain [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Problem

I'm using the following .htaccess file to force any page request to https:// ``` RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ``` How could I force https for all directories/pages except the directory "/domain" ? I can change the main htacces or create a new one in the /domain directory, the easy way, but how?

Original source