Custom URL for Webmail

Good evening, I don’t know if you are still interested, but to do the proxy correctly I solved it this way. I hope it can be the help to someone!

### [PROXY] Snappymail
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/snappymail
REWRITERULE ^(.*)$ https://cyberpanel/snappymail/$1 [P,L,E=PROXY-HOST:www.example.com]
RewriteCond %{REQUEST_URI} ^/snappymail
REWRITERULE ^(.*)$ https://cyberpanel/$1 [P,L,E=PROXY-HOST:www.example.com]

www.example.com should be replaced with the correct host.

3 Likes