Avoid domain.com/webmail redirect to domain.com:2096
AnsweredHi,
I would like to configure my WHM/cPanel server domains to ensure that /webmail on all domains securely redirects to the webmail login page without exposing the port number (e.g., :2096) in the URL.
Could you please provide the steps to achieve this?
Key Requirements:
- Redirect /webmail on all domains to the webmail interface using HTTPS.
- Ensure the port number remains hidden in the URL
Thank you for your support!
-
Hey there! I don't have a workaround for this issue as that is just how cPanel is configured. However, by default cPanel has Service Subdomains configured to "On" on WHM >> Tweak Settings, so you could use webmail.domain.com instead, and that will stay in the browser without showing the port number.
Visiting domain.com/webmail is actually a custom Apache redirect we have configured which you can see inside the Apache configuration with this entry:
ScriptAliasMatch ^/?webmail$ /usr/local/cpanel/cgi-sys/wredirect.cgi
ScriptAliasMatch ^/?webmail/ /usr/local/cpanel/cgi-sys/wredirect.cgiso there isn't a way to adjust that on a cPanel machine.
0 -
Can you let me know what 'doesn't work' means? Like I mentioned, there isn't going to be a way to remove the port number, but if you use webmail.domain.com that "sticks" in the browser without showing the port. Is that what isn't working?
0 -
Sorry for the typo. The webmail.domain.com is working fine as expected.
0 -
I'm glad to hear that's working!
0
Please sign in to leave a comment.
Comments
4 comments