Skip to content

Instantly share code, notes, and snippets.

@parsafatehi
Last active November 7, 2021 07:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parsafatehi/8ccd5dafaf3224cf04797335e7ac2764 to your computer and use it in GitHub Desktop.
Save parsafatehi/8ccd5dafaf3224cf04797335e7ac2764 to your computer and use it in GitHub Desktop.
Redirect subdomain to a URL with Nginx (e.g. Zoho webmail custom mail URL)
server {
listen 80;
server_name webmail.DOMAIN.com;
rewrite ^(.*) https://mail.zoho.com/zm/#mail/views/unread$1 permanent;
}
server {
listen 443 ssl;
server_name webmail.DOMAIN.com;
rewrite ^(.*) https://mail.zoho.com/zm/#mail/views/unread$1 permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment