How to disable /webmail redirection

Avatar
  • Answered
I have a new domain that I have just added to my hosting plan. In that website, we had a folder to access email through a webmail portal hosted elsewhere. Within the folder, we have an index.html file that does an automatic redirect to the proper portal. Our users used to access the webmail portal through:

www.domain.tld/webmail

Since witching the domain hosting to here, users are no longer able to access the old webmail portal through that address, which we would like to maintain. Instead, they get re-directed to the InMotioHosting webmail portal.

I have looked through the cPanel settings and have added a redirection in one of the settings, but have had no success. I've also searched through the support forums, and have tried adding redirection in the .htaccess file.

Can you please tell me how to turn off the automatic redirection of /webmail so that I can implement my own?

Many thanks.
Avatar
JacobIMH
Hello, As Jeff had mentioned, unfortunately due to the way the /webmail re-direction is handled at the server-wide Apache level you can't have this forwarded off to another service. If you have a physical /webmail folder with a index.html file inside it, you can still go directly there to trigger the redirection:
www.domain.tld/webmail/index.html
You could also setup a 301 redirect to redirect the URL to the correct web portal so they don't have to enter index.html. For instance if you're using gmail.com as your webmail portal, the following .htaccess code would work:
Redirect 301 /webmail/go http://gmail.com
Then if you typed in
www.domain.tld/webmail/go
You'd get redirected to the URL you set it up to go to, in this case gmail.com. That's unfortunately the only thing I can think about, other than being on a VPS or dedicated server, where the global /webmail rewrite can be turned off for you. - Jacob
Avatar
JeffMa
This is not something that would be possible within a shared hosting environment as the configuration would effect all users, however, within a VPS or dedicated server, it can indeed be done. If on a VPS or dedicated server, you may simply submit a ticket with support in which these changes could be made. If you are currently on shared hosting and need to upgrade your account, you may complete the upgrade process via AMP.