Reputation: 2166
I have two websites on local IIS (ver 8):
\Website1 (Binding: http:*:80:)
Index.html
\Website2 (http:*:80:anotherwebsite.com)
Index.html
Is there a way to browse locally IIS website Website2? Browsing anotherwebsite.com is wrong - DNS will point me to the "public" anotherwebsite.com. Browsing localhost/anotherwebsite.com is also wrong - this will browse Website1.
I cannot change hosts file - this change has to be quick and easy (used for deployment heartbeat). I also don't want to add another binding (possible solution would be to add binding http:*:123: to Website2 and browse localhost:123.
Upvotes: 0
Views: 1038
Reputation: 155608
The only way is to get your web-browser to connect to localhost
but to spoof the Host
header. Fortunately there are Chrome and Firefox extensions to do this. Search online for "chrome extension spoof host-header" (or Firefox). There are no extensions yet available for MS Edge.
Another option is to use the venerable Fiddler tool, which is a local HTTP proxy that works on every web-browser and lets you change any outgoing headers too: fiddler: how to disable overwrite Header Host
Upvotes: 2