Subdomains Particular Redirection

Discussion in 'General' started by vaio1, Aug 19, 2007.

  1. vaio1

    vaio1 ISPConfig Developer

    Hi guys,

    I need to rewrite the URL from www.mydomain.tld/webmail to webmail.mydomain.tld

    How can I do it?

    Furthermore, I need to redirect all subdomains in a main domain.

    I would like to use the wildcard * to specify that all domains must go to the main domain. Is it possible?

  2. till

    till Super Moderator

  3. vaio1

    vaio1 ISPConfig Developer

    The two solutions doesn't work on my system!
    I've tried to change the source code deleting the "[R]" and nothing happens.
    I've tried to use the .htaccess but is very difficoult for me.

    I would like to use the wildcard * to specify that all domains must go to the main domain and the subdomains registered go to the forward url.

  4. falko

    falko Super Moderator

  5. vaio1

    vaio1 ISPConfig Developer

    Hi Falko,

    thank you for your suggestions but it very difficoult for me configure a subdomain with ispconfig and fix the problem of the URL rewriting.

    I have set the wildcard in the dns settings so my domain has:


    I would like to write http://webmail.mydomain.tld without the rewriting in to http://www.mydomain.tld/_webmail/htdocs

    How can I do it ?


    This is what I have see into the Vhost file.

    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^webmail\.mydomain\.tld [NC]
    RewriteRule ^/(.*)         http://www.mydomain.tld/_webmail/htdocs/$1 [L,R]
  6. falko

    falko Super Moderator

  7. vaio1

    vaio1 ISPConfig Developer

  8. till

    till Super Moderator

    Please try:


    at the end of the rewrite rule unstead of [L,R]
  9. vaio1

    vaio1 ISPConfig Developer

    Hi Till, the problem persist. Have I restart the service?

  10. till

    till Super Moderator

    If you changed it in the vhost file manually, then yes. If you changed it in the ISPConfig interface, then no.
  11. vaio1

    vaio1 ISPConfig Developer

    How can I change it in the ISPConfig interface? I have changed it manually and I have restarted the apache but nothing has changed.
  12. falko

    falko Super Moderator

    You can use the Apache Directives field to put in your redirect rules.
  13. vaio1

    vaio1 ISPConfig Developer

    May you do an example about this case?

  14. till

    till Super Moderator

Share This Page