Posts: 31,883
Thanks: 691
Thanked 4,188 Times in 3,205 Posts
You can do this already by prefixing the domain with a number and then add the domain back as aliasdomain. e.g.:
Change the domain in the site settings from domian.tld to 01-domain.tld and then add domain.tld as aliasdomain. So changing the vhosts file manually as you did is not required.
10x for hint. It's working...
What I don't understand:
If I type http://ip1 , in the address bar remains http://ip1 and display the page correctly.
But if I type http://ip2 , the address bar is changing in http://www.mydomain.tld and of course display the page correctly.
Posts: 31,883
Thanks: 691
Thanked 4,188 Times in 3,205 Posts
Either there is a rewrite rule in a .htaccess file of that site or you use a cms system on IP2 that does the redirect. E.g. wordpress is doing this and other cms are doing a redirect to their main domain as well.
Recent comments
2 days 19 hours ago
3 days 4 hours ago
3 days 7 hours ago
3 days 8 hours ago
3 days 9 hours ago
3 days 11 hours ago
3 days 13 hours ago
3 days 14 hours ago
4 days 6 hours ago
4 days 7 hours ago