Make mail.domain.tld show domain.tld/webmail

Discussion in 'Installation/Configuration' started by thisiszeev, Jul 25, 2023.

  1. thisiszeev

    thisiszeev Member HowtoForge Supporter

    Hi all

    I am busy setting up a new ISPC server...

    A issue I have with clients is that they tend to go to mail.domain.tld when they want to access their webmail.

    I would like to make mail.domain.tld display the contents of mail.domain.tld/webmail

    I can easily get mail.domain.tld to redirect to domain.tld/webmail, but would prefer the former.

    I have setup a website called mail.domain.tld and in the document root, I have created a .htaccess file. In the file I have the following...

    Code:
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain.tld$ [NC,OR]
    RewriteCond %{HTTP_HOST} ^www.domain.tld$
    RewriteCond %{REQUEST_URI} !webmail/
    RewriteRule (.*) /webmail [L]
    Alas it does not furnish the results I am looking for. Any advice?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try using a proxy instead.
     
  3. thisiszeev

    thisiszeev Member HowtoForge Supporter

    Thanks @till
    I will give that a try and revert.
     
  4. thisiszeev

    thisiszeev Member HowtoForge Supporter

    Nope, did the exact thing as 301 Redirect. Simply changed the address to domain.tld/webmail...
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Using a proxy should work. I know that several users use it that way.
     
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    What is wrong with this?
    This is weirder.

    What you may want, I think, if I understand you correctly is the content of the webmail in that mail.domain.tld.

    IMV you should just install webmail app in that subdomain root or change its root to where you already have it now. Does this made better sense?

    Or perhaps you can explain further because after reading your posts above, I still don't quite understand you fully.
     
  7. thisiszeev

    thisiszeev Member HowtoForge Supporter

    @ahrasis That sounds like slavery with extra steps, when Roundcube is already present.
    I settled on setting a redirect that just diverts to the main server FQDN/webmail.

    It is functional and clients won't know the difference
     

Share This Page