Hi.
Please, I need your insight on this.
Problem:
HTTPS redirection is not working when it set using cPanel Redirects.
The generated rule looks like this:
Temporary Solution:
For this to work, we remove: `RewriteCond %{HTTP:X-Forwarded-SSL} off` from the rule in .htaccess file.
Please, what could account for this?
Our assumption is that perhaps it is because Apache doesn’t have `X-Forwarded-SSL` variable and so cannot determine whether `RewriteCond %{HTTP:X-Forwarded-SSL}` is ON or OFF and thus give up.
Thanks a lot for your help!
Please, I need your insight on this.
Problem:
HTTPS redirection is not working when it set using cPanel Redirects.
The generated rule looks like this:
Code:
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} off
RewriteCond %{HTTP_HOST} ^example\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.example\.com$
RewriteRule ^(.*)$ "https\:\/\/example\.com\/$1" [R=301,L]
For this to work, we remove: `RewriteCond %{HTTP:X-Forwarded-SSL} off` from the rule in .htaccess file.
Please, what could account for this?
Our assumption is that perhaps it is because Apache doesn’t have `X-Forwarded-SSL` variable and so cannot determine whether `RewriteCond %{HTTP:X-Forwarded-SSL}` is ON or OFF and thus give up.
Thanks a lot for your help!