Skip to main content

HTTPS redirect .htaccess issue

Comments

4 comments

  • User Avatar
    gopkris2005
    If possible, try this settings RewriteEngine On RewriteCond %{HTTP_HOST} ^mydomain\.co.uk$ [NC] RewriteRule ^(.*)$ https://www.mydomain.co.uk/$1 [R=301,L]
    0
  • User Avatar
    thehostingland
    [quote="gopkris2005, post: 1547201">If possible, try this settings RewriteEngine On RewriteCond %{HTTP_HOST} ^mydomain\.co.uk$ [NC] RewriteRule ^(.*)$ https://www.mydomain.co.uk/$1 [R=301,L]
    Tried mate., even this does the same old result no changes :(
    0
  • User Avatar
    thehostingland
    I found the solution as follows : Add another condition to it: [QUOTE]RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{HTTP_HOST} ^(www\.)?maindomain\.com$ [NC] RewriteRule ^$ https://www.maindomain.com/$1 [R,L]
    Also, you'll want to place this at the very top of your htaccess file so that it gets applied before any other rules.
    0
  • User Avatar
    cPanelMichael
    Hello :) You may also want to consider installing separate SSL certificates for each addon domain name. It's possible to install multiple certificates for domain names on the same account and IP address assuming your system supports SNI (CentOS 6 or RHEL 6 and cPanel version 11.38 or higher). Thank you.
    0

Please sign in to leave a comment.