Closed muhanadali100 closed 1 year ago
Thanks for the post. This is a very common question about redirecting a URL but, that is not possible with DNS. Redirection of URL happens at the HTTP protocol level. So, you need to configure your web server for handling that specific request and make it do a 302 redirect to the URL of your choice.
For example, if you are using nginx as the web server, use the config snippet shown below:
server {
listen 80;
listen [::]:80;
server_name 1.1.1.1;
location /rad {
return 302 http://rad.ams.com$request_uri;
}
location /git {
return 302 http://git.ams.com$request_uri;
}
}
I have multisystem on the same linux system on same ip address like
1- 1.1.1.1/rad 2- 1.1.1.1/git
can i make a forward by dns to make this
1.1.1.1/rad --------> rad.ams.com 1.1.1.1/git ---------> git.ams.com