Redirect .htaccess for HTTPS

0

Hello, I'm not able to do the redirect via .htaccess to the same page / domain with the https protocol;

I tried the code below but it does not work, the reason is that the ssl certificate was installed on the firewall, not on the machine, so apache does not recognize it.

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} www.mydomain.com
RewriteCond %{REQUEST_URI} !/robots.txt
RewriteRule (.*) https://www.mydomain.com/$1 [R=301,L]

Is there any way to do the redirect using the ex protocol: if http does not exist, it redirects to https

Thank you frame

    
asked by anonymous 27.01.2018 / 19:42

0 answers