0

I have gone through this post where they suggested two separate rules but I want to combine both rules into one.

For my this is working (repeating same rule)

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [R,L]

RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [R,L]

but this won't work:

RewriteCond %{HTTP_HOST} ^example\.com [NC]
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [R,L]

Is there a possibility of htaccess unable to read three conditions?

0 Answers0