Redirect from https://mydomain.com to https://www.mydomain.com ?

Discussion in 'ISPConfig 3 Priority Support' started by JohnnyBeGood, Oct 17, 2016.

  1. JohnnyBeGood

    JohnnyBeGood Member

    Hi,

    So I'm using ISPconfig v3.1 and I'm having hard time to get redirect from https://mydomain.com to https://www.mydomain.com
    Obviously redirect from mydomain.com to https://www.mydomain.com works. I have turned on Sites > mydomain.com > Redirect > Rewrite HTTP to HTTPS and also triied to enter this:
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    under Sites > mydomain.com > Options> Apache Directives but it did not make any difference.
    My question is do I have to have both above options and what else do I miss?
    Do I need change Sites > mydomain.com > Redirect> Redirect Type ?
    My goal is to redirect everything to https for Google SEO
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The rewrite condition that you posted will rewrite every http:// request to https://, no matter if the domain is with or without www.
     
  3. JohnnyBeGood

    JohnnyBeGood Member

    Thanks for taking time to reply!
    Ok, so are both Rewrite HTTP to HTTPS and what I have in Apache Directives needed?
    My goal is when https://mydomain.com is typed to be redirected to https://www.mydomain.com at this point no redirect is happening.
     

Share This Page