Add subdomain to localhost URL
Asked 07 September, 2021
Viewed 3K times
  • 62
Votes

I am writing an web application that behaves differently depending on a url prefix. The format is something like:

   https://myprefix.mycompany.com

The web app behaves differently based on myprefix. My web app extract that part from the URL and act on that.

However, when I test on my local, I use an localhost address:

   https://localhost:1234

I counldn't do something like:

   https://myprefix.localhost:1234

What is the best way for me to test this scenario?

Many thanks

5 Answer