Skip to main content

Redirecting http to https not working as expected

Comments

3 comments

  • cPanelMichael
    Hello @Angel Castro, You could try using the following entry in the .htaccess file: RewriteEngine On RewriteCond %{HTTPS} !on RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$ RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$ RewriteCond ${HTTP_HOST} ^domain\.com [NC,OR] RewriteCond ${HTTP_HOST} ^www\.domain\.com [NC] RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    You'd have to replace "domain" with your actual domain name. Let me know if this helps. Thank you.
    0
  • Angel Castro
    Hi @cPanelMichael, didn't work, doesn't redirect http to https. Thanks anyway.
    0
  • cPanelMichael
    Hi @Angel Castro, Feel free to open a
    0

Please sign in to leave a comment.