Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

mail.domain.com -> www.domain.com/webmail

Discussion in 'E-mail Discussion' started by projectandrew, Sep 16, 2003.

  1. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    United Kingdom
    Any way to automatically configure domains to redirect mail.domain.com to www.domain.com/webmail?

    Thanks!

    cPanel.net Support Ticket Number:
     
    #1 projectandrew, Sep 16, 2003
    Last edited: May 20, 2004
  2. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Moscow
    Add it into httpd .conf:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^mail\.(.*)
    RewriteRule ^.* http://www.%1:2095 [L]

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    623
    Likes Received:
    1
    Trophy Points:
    168
    Adding that to httpd.conf produced an error:

    Syntax error on line 2 of /usr/local/apache/conf/httpd.conf:
    Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration
    /usr/local/apache/bin/apachectl startssl: httpd could not be started.
     
  4. WMS

    WMS Active Member

    Joined:
    Jul 18, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Moscow
    Maybe, you do not have mod_rewrite module loaded with apache.

    cPanel.net Support Ticket Number:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    623
    Likes Received:
    1
    Trophy Points:
    168
    Yep, you are right! :(
     
  6. projectandrew

    projectandrew Well-Known Member

    Joined:
    Aug 27, 2003
    Messages:
    184
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    United Kingdom
    I've been playing with this in httpd.conf and found it only works if its put into the virtualhost section of a site, and also only if mail.domain.com is added to the serveralias field - it also works best for me if I use [L,R] instead of just [L].

    Question is, is there an easy way for this to apply to all virtual hosts without having to edit each one, or change a file somewhere so it will auto-add to each new domain. Also, can it be done without adding mail.domain.com to the serveralias field?

    Thanks!

    cPanel.net Support Ticket Number:
     
    #6 projectandrew, Sep 18, 2003
    Last edited: May 20, 2004
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice