I have in the .htaccess file a redirect of all requests for the https protocol
RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} But you need to exclude from this rule one folder for example /my_dir
How to do it?
I have in the .htaccess file a redirect of all requests for the https protocol
RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} But you need to exclude from this rule one folder for example /my_dir
How to do it?
Already found the answer:
RewriteCond %{HTTPS} !on RewriteCond %{REQUEST_URI} !^.*/my_dir/.*$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} RewriteRule !/my_dir/ https://%{HTTP_HOST}%{REQUEST_URI} (only with one RewriteCond %{HTTPS} !on )? - Wiktor StribiżewRewriteRule /([^my_dir])/ https://%{HTTP_HOST}%{REQUEST_URI} but this rule completely disabled the redirect to https - stckvrwSource: https://ru.stackoverflow.com/questions/907295/
All Articles