How to create a htaccess rewrite rule to https for non xml file request and when the request URI not containing string "display"?
I've tried the following but this doesn't work:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !xml [NC,OR]
RewriteCond %{REQUEST_URI} !display [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Thank you.
Use:
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !xml [NC]
RewriteCond %{REQUEST_URI} !display [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,NE,R=301]
Because it's AND
and not OR