Subdomains Particular Redirection

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

  1. vaio1

    vaio1 Member

    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 *.mydomain.com to specify that all domains must go to the main domain. Is it possible?

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. vaio1

    vaio1 Member

    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 *.mydomain.com to specify that all domains must go to the main domain and the subdomains registered go to the forward url.

    Thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

  5. vaio1

    vaio1 Member

    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:

    www.mydomain.tld
    *.mydomain.tld

    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 ?

    Thanks


    This is what I have see into the Vhost file.

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

    falko Super Moderator Howtoforge Staff

  7. vaio1

    vaio1 Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try:

    [L]

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

    vaio1 Member

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

    Thanks
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

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

    vaio1 Member

    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 Howtoforge Staff

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

    vaio1 Member

    May you do an example about this case?

    thanks
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page