Map subdomains and path to localhost?

0

For a particular development task, I need this mapping to happen:

mysub.myservice.com/a/b/* -> localhost/*

mysub.myservice.com/anything else should route as normal.

What is the simplest way to set this up on OSX? I tried dnsmasq but I couldn't figure out how to get this specific mapping to work.

I'm on OSX 10.10.

Stefan Kendall

Posted 2015-09-28T13:28:52.273

Reputation: 756

You could use a hosts edit in combination with a web server to do this. – user193661 – 2015-09-28T14:00:14.903

@user193661 This was my initial thought as well. – Stefan Kendall – 2015-09-28T14:01:03.537

If you have many lines in hosts, you can try putting the new entry at the top. – user193661 – 2015-09-28T14:08:20.997

No answers