remove rewrite url from vhost permanently

Discussion in 'Installation/Configuration' started by Darkmagister, Feb 20, 2020.

  1. Darkmagister

    Darkmagister New Member

    Hello,
    i've recentrly uploaded a website on a ispconfig 3.1.15p2, i've created a new site as always, unfortunatelly i don't know anything about the website itself, as soon as uploaded the website just reply with too many redirects errors,
    i've commented out from the vhost conf file,
    Code:
                    #RewriteCond %{HTTP_HOST}   ^www\.domain\.com$ [NC]
                    #RewriteRule   ^/(.*)$ http://www.domain.com  [R]
    
    and now the website works, but everytime i do something it seems like ispconfig is restoring the "normal" version, so where i can tell ispconfig to not add this line, or what can i do?

    (OS: Debian 10, Webserver: Apache 2.4.38)

    thanks
     
  2. Steini86

    Steini86 Active Member

    Is something set on the "redirect" panel from the web?
    Looks like you have set to have a www redirect (set autosubdomain on first panel?). And probably a http->https redirect.
    If you connect via http, ispconfig does first a redirect to www. and then to https://www. istead of directly redirecting to the https site. Some Browsers/CMS don't like this and give you a "too many redirects" error.
    Just remove the redirects and do your own config to directly redirect to https://www. ...
     
    Last edited: Feb 21, 2020
  3. Darkmagister

    Darkmagister New Member

    it seems connected to the add www. automatically, but if i remove it it doesn't reply anymore at www.domain

    ServerAlias www.domain.com

    this part is not added if i remove the auto www. in ispconfig, and that's an issue for me i think

    EDIT:
    i've "solved" for now removing the auto www. and adding a domain alias as the www.domain.com that also without the auto www. and it seems to work.
     
    Last edited: Feb 27, 2020

Share This Page