I am going to build a website on a test server that will behave differently depending on which domain is used to access it (The real website will have multiple domains pointing to it).
But how will I be able to simulate the different domains on the test server?
Just create fake domains pointing to your localhost in /etc/hosts file.
For example,
127.0.0.1 localhost domain1.com domain2.com
On Windows, this file is,
WINDOWS\SYSTEM32\DRIVERS\ETC\HOSTS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With