The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect to a different domain for /webmail

Discussion in 'E-mail Discussions' started by Ekushey, Jun 7, 2014.

  1. Ekushey

    Ekushey Member

    Joined:
    Oct 26, 2011
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bangladesh
    cPanel Access Level:
    Root Administrator
    Twitter:
    One of my customers want all their webmail users to get redirected to companyDomainName/newLink and companyDomainName:newPort, and I'm wondering how this can be done.

    I hope /webmail to /newLink can be changed from /usr/local/apache/conf/httpd.conf, but what about the port and the redirection? Can this be done?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The "ScriptAliasMatch" entries for /cpanel, /whm, and /webmail are removable and modifiable in the /usr/local/apache/conf/httpd.conf file. EX:

    Code:
    ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
    ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
    ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
    ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
    
    Remember to make the modifications using the instructions at the URL below to ensure the changes are preserved:

    Custom Directives Outside of a VirtualHost Tag

    Thank you.
     
Loading...

Share This Page