Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member
    Join Date
    Nov 2004
    Location
    Europe
    Posts
    106

    Default redirect webmail to another location

    hello,

    I've installed a new webmail which I want to use in the future.

    So now I want to redirect all my users which try to access webmail over www.xyz.com/webmail to www.mynewwebmaildomain.com. How can I do this?

    in httpd.conf I found this:
    PHP Code:
    ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi 
    How can I redirect all request for ^/?webmail/ to another domain?

    Thanks!

  2. #2
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    This may be possible by changing the existing redirect in the Apache configuration (httpd.conf) file, running the Apache configuration distiller, then testing if the change is saved by regenerating/rebuilding the Apache configuration (httpd.conf) file.

    Please see the following documentation for details regarding how to do this step-by-step:
    Apache & cPanel/WHM
    EA3Overview < EasyApache3 < TWiki
    OutsideVHost < EasyApache3 < TWiki

  3. #3
    Member
    Join Date
    Nov 2004
    Location
    Europe
    Posts
    106

    Default

    Thanks Don

    I know that I just can modify /usr/local/cpanel/APACHE_CONFIG but the problem is that I don't know how I must make the redirect.

    Just
    PHP Code:
    ScriptAliasMatch ^/?webmail/?$ www.mywebmaildom.com 
    or must I execute a Perl or Bash Script which redirects the user with the "header" function?

    Thanks!

  4. #4
    Member
    Join Date
    Nov 2004
    Location
    Europe
    Posts
    106

    Default

    can I solve my problem with this? :

    PHP Code:
    Redirect ^/?webmail/?$ http://www.mynewwebmailurl.com/ 
    I'm not sure...

  5. #5
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    You might try changing it to an entry in the following format (where "ScriptAliasMatch" is changed to "RedirectMatch":
    Code:
    RedirectMatch ^/?webmail/?$ http://www.webmaildomain.tld/
    Here is related documentation for Apache (versions 2.2, 2.0, and 1.3):
    http://httpd.apache.org/docs/2.2/mod...#redirectmatch
    http://httpd.apache.org/docs/2.0/mod...#redirectmatch
    http://httpd.apache.org/docs/1.3/mod...#redirectmatch

  6. #6
    Member
    Join Date
    Nov 2004
    Location
    Europe
    Posts
    106

    Default

    Thanks,

    If I also made this change to /usr/local/cpanel/APACHE_CONFIG it should also work propper after a apache update, right?

  7. #7
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Lightbulb

    Quote Originally Posted by apogee View Post
    If I also made this change to /usr/local/cpanel/APACHE_CONFIG it should also work propper after a apache update, right?
    I would not recommend editing the specified file to accomplish the redirect.

    Are other methods not working as expected?

  8. #8
    Member
    Join Date
    Oct 2009
    Posts
    15

    Default redirect works

    you can add a simple autoforwarder in mail settings, but in that case you will also receive emails on your original email and it will also be redirected or forwarded to your target email id automatically. hope this helps.

Similar Threads & Tags
Similar threads

  1. External Webmail Redirect
    By bhcomjared in forum E-mail Discussions
    Replies: 2
    Last Post: 06-26-2008, 02:43 PM
  2. webmail and cpanel redirect.
    By buglerroller in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 09-04-2006, 03:37 AM
  3. can you DISABLE /webmail redirect
    By wjtaylor in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 01-20-2006, 03:59 PM
  4. Webmail, Port redirect with APF
    By odesia in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-02-2004, 10:19 AM
  5. Webmail Redirect
    By wantmaker@spider in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-30-2003, 12:19 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube