Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Windows 7 how do we redirect hostnames to specific IP address AND port.

For example:

example.com   redirects to    123.123.123.123:8080

Note 1:

C:\Windows\System32\drivers\etc\hosts can NOT redirect to a specific a port.

Note 2:

This thread:

Forwarding only on a single port 8080 to localhost (windows) possible?

refers to an app that is no longer available.

I tried privoxy but I am stuck, if someone can walk me through this.

share|improve this question

migrated from stackoverflow.com Mar 7 '12 at 23:49

This question came from our site for professional and enthusiast programmers.

    
I guess you're mixing redirection with hostnames definition. If you need redirection, ntg to do with OS but with your http server setup. For example in Apache, using mod_redirect directives. I do not about IIS if this is what you're using but pls look into your server setups. –  hornetbzz Mar 7 '12 at 23:47
    
You could look into a DNS/Reverse Proxy server that will take requests from example.com and redirect to your local IP/Port. –  kobaltz Mar 7 '12 at 23:54

1 Answer 1

As far as I know, even Squid is not capable of this, let alone Privoxy. You should do this with IP Filters, e.g. iptables on Linux (I really don't know what will do on Windows).

If you only demand it when you browsing web pages, there're extensions for Firefox and Chrome both called something like "Redirector".

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.