Website redirection

Discussion in 'General' started by SamTzu, Jan 5, 2012.

  1. SamTzu

    SamTzu Active Member

    Is there a way to redirect several different domains in ISPC3 to one site?

    This seems to work OK with Alias domains but aliases don't "redirect" so the website is displayed with wrong domain address.

    If Apache rules are also used with redirect options an infinite loop is usually the result.

    I would like to have this setup... -> -> -> -> -> -> -> ->


    How should this setup be configured so that infinite loop does not result?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    That is done with aliases. Add each domain as alias and use "" as redirect path.
  3. SamTzu

    SamTzu Active Member

    To clarify... instead of adding in the alias name field I should add
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, you have to add http:// in front of the redirect path.
  5. SamTzu

    SamTzu Active Member

    It does not seem to be possible to add in the Domain field on Alias settings.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The redirect path field, not the domain field.

    Parent website:
    Redirect type: no flag
    Redirect path:
  7. SamTzu

    SamTzu Active Member

    thx. You are the man.
  8. New Member

    redirect path to a FILE and not to a directory?

    Good day,

    I want to redirect to a file and not to a directory (ISPConfig Manual section 5.5 only writes about redirect to a path.

    so, I want to redirect to

    it is not an option to let the "other" site at create an appropriate directory.

    How can this be solved? Within apache directly this is not a problem at all.

    thanks, martin
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Create a .htaccess file and add your apache rewrite rules there instead of using the rewrite function in the domain settings.
  10. New Member

    yes, but then the enduser has to use a FTP client etc ... else one just has to edit the line within ISPConfig, this would be a much smarter, quicker and easier solution for everybody involved (even for support).
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The ispconfig redirect function is made to redirect a domain to a directory only. What you try to do is a typical redirect as it is used by cms systems in .htaccess files and should be added to a .htaccess file.
  12. New Member

    well, currently we do it manually in apache:

    Redirect permanent /
    CustomLog /var/log/httpd/redirect-access.log combined
    ErrorLog /var/log/httpd/redirect-error.log

    ... and this is what I try to also solve directly in ISPConfig. The "only redirect to directories" is, AFAIK, not an Apache rule.
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Of course, as you do this not in the intended way. Your way is for servers that dont have ispconfig installed.

    The correct way(s) for ISPConfig servers are e.g:

    1) Add as website or as aliasdomain of another wesbite in ISPConfig.

    2a) Then either add a file named .htaccess in the web directory of the website containing just one line:

    Redirect permanent /

    2b) Or you add this line:

    Redirect permanent /

    in the apache directives field of the website in ISPConfig, which is on the options tab.
    Last edited: Jan 13, 2012
  14. New Member

    as for option 2b: thanks ... better than nothing :)
    means: at least doable as admin within ISPconfig.

    the customer (still) has no option to change the settings (only with option 2a).

  15. vaio

    vaio New Member

    Hello, i have a question.

    If i use L redirect under website settings, this means that it redirects to different site, but preserves web address?

    www.WEB1.tld -> www.websiteone.tld, but showing WEB1.tld as url

    (i have tried that, but shows websiteone.tld as url).

    Should i use different settings?
    Thank you for advice!

  16. till

    till Super Moderator Staff Member ISPConfig Developer

  17. vaio

    vaio New Member

    Thank you Till for pointing that out.

    I believe there is a small bug in
    1. i have created website and added redirection to other - works OK
    2. i have than removed this redirection - shows like no redirection, but it still redirects... - i think it didn't remove redirection as it should, still redirects to other site /on monitor system log was completed

    I will completely remove site, than add it again and hopefully it will solve this problems. I just need to make backups etc first.

    Will report back!
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    There is no such bug and there is no need to remove the site. Just close your browser or empty the browser cache as the browser remembers the redirect. Beside that, ensure that you waited until the jobqueue in the monitor is empty as it takes some time until the changes are written to disk.

Share This Page