Redirect a subdomain to another IP with nginx

411 Views Asked by At

This is my problem:

I have a website mywebsite.tld and my email address is on another domain, let's say mywebmail.tld.

What I want is to create a subdmain mail.mywebsite.tld which redirect to mywebmail.tld but I want to keep the url mail.mywebsite.tld.

I know how to redirect but I don't know how to keep the good url. I also tried with an iframe but it doesn't work with roundcube.

What I have to do with my registar or/and my nginx configuration?

Thank you :)

EDIT : I tried mail 10800 IN A IP-OF-mywebmail.tld in my registar but it's like a simple redirection. In fact, the IP of mywebmail.tld has a redirection on it... I have no idea how to proceed.

0

There are 0 best solutions below