Answer the question
In order to leave comments, you need to log in
How to redirect a specific website directory from https to http using htaccess?
How to redirect a specific website directory from https to http using htaccess?
At the same time, for the rest of the site, the redirect to https should be saved, which is now implemented using the lines:
RewriteCond %{HTTPS} =off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]
Answer the question
In order to leave comments, you need to log in
Try (sorry, didn't check):
RewriteCond %{HTTPS} =off
RewriteCond %{REQUEST_URI} !^/dir/
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]
RewriteCond %{HTTPS} =on
RewriteCond %{REQUEST_URI} ^/dir/
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [QSA,L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question