Redirect an alias domain to a php script

Discussion in 'Installation/Configuration' started by Zerogiven, May 8, 2013.

  1. Zerogiven

    Zerogiven New Member


    I have a tiny problem with my alias domains...

    I created one for a website which should redirect to a script at the main page.

    For example...


    So, the alias should redirect to:

    So if i create my alias with these settings:
    Redirect Type: R=301, L
    Redirect Path:

    It looks almost fine, but if i call it redirects to (look at the last "/" which i did not set at the redirect path)

    It always append a "/"

    Is there any way where it will not append it?
    Cause with my actual .htaccess the script fails with a leading slash.

    At the moment i have a "stupid" solution where it redirects two times. First from the alias into a directory and from there it redirects with php to the script i want.

    Would be nice if anyone can help me how not to redirect two times :)

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The redirect function is only for directory redirects, so you can not use that for files.

    You can create a file redirect by using a .htaccess file in the website, so just add the aliasdomain and do not configure a redirect in ispconfig and then put a .htaccess file in the web directory of the site which dcontains a rewrite rule to forward the requests to your php file like many cms systems do it.

Share This Page