Wednesday, February 13, 2008

Reverse Proxy with IIS

Have you ever needed to do reverse proxy using IIS? if yes, read on.

You need to have ISAPI REWRITE product from here
Install on your IIS server and put the following code:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^my.external-domain.com$

RewriteProxy ^(.*) http://my.internal-domain.com:9999/$1 [H,A,L]

This allows you to access my.external-domain.com from the Internet over HTTP (Port 80) and then proxied by IIS with the help of ISAPI to your my.internal-domain.com port 9999 which is located on the other internal 'inaccessible-from-the-Internet' server.

No comments: