Redirect /webmail to another subdomain

amstel

Active Member
Nov 18, 2015
32
4
58
UK
cPanel Access Level
Root Administrator
Hi all,

Could you please tell me how I can redirect mydomain.co.uk/webmail to mail.mydomain.co.uk/webmail
The first domain is on one server and the subdomain is on another server with a different IP.

I have tried to use the Redirect in cPanel:
Code:
Domain     Directory     Regular Expression     Redirect URL     HTTP Status Code     Type     Match www.     Wildcard     Actions
mydomain.co.uk     /webmail         https://mail.mydomain.co.uk/webmail     301     permanent
but I get this (photo below) and for the both options, it goes again to mydomain.co.uk/webmail

Screenshot 2021-03-18 at 11.43.39.png
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
7,418
1,000
313
cPanel Access Level
Root Administrator
Hey there! The /webmail redirect is a core function that is built in to the main Apache configuration, so it would take some manual work to override that. We have some details posted in the following thread that has more options for this work:


so let me know if that helps.