ISPCONFIG 3.1 not updating apache directive

Discussion in 'ISPConfig 3 Priority Support' started by pawan, Sep 28, 2016.

  1. pawan

    pawan Member HowtoForge Supporter

    I have added a directive in my vhost
    Code:
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
    Subsequently I removed it, but it is not removed from the vhost file, I had to manually remove the code.
     
  2. chico11mbit

    chico11mbit Member HowtoForge Supporter

    have you set "Rewrite HTTP to HTTPS" in Sites/Web Domain/Redirect?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Please use the debug mode if you want to know why a config could not be changed.
     
  4. pawan

    pawan Member HowtoForge Supporter

    Thanks Till. I will try that.
     
  5. sjau

    sjau Local Meanie Moderator

    According to the Apache docs it's better to use Redirect instead of Rewrite:
    https://wiki.apache.org/httpd/RedirectSSL
    Code:
    Redirect permanent / https://domain.tld/
    
    Unfortunately it doesn't work with wildcards.
     
  6. pawan

    pawan Member HowtoForge Supporter

    Thanks Saju,
    Will the above directive will work for both www and non www?
     
  7. sjau

    sjau Local Meanie Moderator

    yes, but it will both forward to domain.tld or www.domain.tld - depending on what you have in your rule. Same goes if the origin is an alias domain. It would then forward for example for www.alias-domain.tld -> domain.tld
     

Share This Page