IIS to handle request transfer to other server (without url rewrite)

2.2k views Asked by At

I want my website to serve static contents by different server and if possible even javascripts files as well from another server. I know it can be achieved using url rewrites but it gives 301 errors (i.e. extra round trip to browser). I asked similar question here but did not get any satisfactory response as it seems my question was not correct.

Can some one suggest how to achieve this without extra round trip to browser? I have seen other teams achieving this in Apache server but not able to find how to do it in IIS.

1

There are 1 answers

2
Wiktor Zychla On

Have you tried "Rewrite" instead of "Redirect"? These are at least two viable options of rewriting where Redirect means 301/302 and rewrite operates silently at the server.

From your other question, it seems that you tried with "Redirect", this explains the 301. Change Redirect to Rewrite then.

The only important thing is that if you want your rewrites act between different servers, you will need the ARR (Application Request Routing) installed on a front-end server. While URL Rewrite handles only local rewrites, ARR can act as a transparent proxy to other servers.

ARR is a free add-on to IIS

http://www.iis.net/downloads/microsoft/application-request-routing