Proxy from external.domain.com/proxy to internal/

Sep 26, 2010 at 6:38 PM

I have been trying to find something for IIS6 that will allow me to do this type of proxy. All of the rewrite/proxy stuff I have tried is missing one critical piece.

The internal server that I have is specifying other files using absolute paths /static, /xml, etc.  In reading through some of this site, it appears that this might also rewrite references in the outbound files to change these to /proxy/static or /proxy/xml.

Am I correct?

If so, can anyone help me with the rules?  I was saw that 3.5 will let you use the "Microsoft URL Rewrite Module".  Should I use this, and how to I configure the URL Rewriter to use it.

I suck at Regular Expressions, so any help is appreciated.

Here is what I want to end up with...

http://myhost.domain.com/proxy to go to http://internalhost/

Source references to be changed from / to /proxy.

Thanks,

Dan

Coordinator
Sep 26, 2010 at 10:55 PM

Try

 

RewriteRule ^/proxy/(.*)               http://internalhost/$1    [NC,P]

Oct 2, 2010 at 3:46 PM
Edited Oct 4, 2010 at 3:01 PM

Hello nberardi,
I managed to run the reverse proxy. Missing some settings in the web.config file.

Now I have another problem, not showing the images and styles that have implemented the intranet application.

What should I do to appear?

I appreciate your help,


Oct 4, 2010 at 10:23 PM
nberardi wrote:

Try

 

RewriteRule ^/proxy/(.*)               http://internalhost/$1    [NC,P]

 This works to proxy the content, but the source files are referencing /folder/file.js. I was hoping there was a way to rewrite the outbound html files to replace /folder/file.js with /proxy/folder/file.js so the request to get that file would work.

 

Dan

Coordinator
Oct 5, 2010 at 2:03 AM

You can try an output Filter.  

http://msdn.microsoft.com/en-us/library/system.web.httpresponse.filter.aspx

Oct 8, 2010 at 4:25 AM

It's necessary that the intranet site to redirect proxy is done is developed is in technology .Net (.aspx)? I'm testing with a site .asp or .php is not working.

How should I proceed to redirect to other technology websites ?

I appreciate your help.

 

Coordinator
Oct 8, 2010 at 12:05 PM

Non .NET sites such as PHP, ASP, etc are only supported in IIS 7 and when the Integrated Pipeline is enabled in the app pool.  

Oct 8, 2010 at 3:51 PM

That is bad news. The website is hosted on a Windows 2003 with IIS 6.0 but the Intranet site is developed in php on a non-windows server.

Know any option for this integration?

Thanks