I'm using host headers in IIS 6 to host multiple websites for the same IP address. Currently I have a need to access one of the websites by IP address rather than URL. Any idea how to do this?
I could take advantage of DNS Rewrite on my firewall but I don't have access to it right at the moment.
Put another host header directive in on the target web site, only enter the desired IP address instead of the host name when you create it. The host header directives just inspect the value of the HOST: HTTP header (which is a string) so you can enter anything in there.
Obviously the server will need to actually have that IP address assigned to it and the web site will need to be listening to that address in order for it to answer :)
Quick and dirty solution: put the web site's name in the
hosts
file of your client computer.This way, when you type http://web.site.name/ in your web browser, it will resolve to the server's IP address and the browser will use exactly that name when making its HTTP requests.
You can do this for multiple names at once, and the browser will behave correctly (i.e. as you want him to) with all of them.
Edit:
Sorry, I misunderstood the question; I thought you wanted to access one of your web sites without having an actual DNS entry pointing to it.
If you actually want to put the IP ADDRESS in your web browser and have the server answer with one specific site, you'll need to either have it run as the default web site on the server, or use another IP address and/or a custom port.