URL Rewrite in IIS not working as desired....

Hi there...
We are moving IIS webservers and sql servers....

In order to avoid the client updating the A-record at stupid-o-clock we wanted to redirect users to the new webserver automatically and seamlessly..

Currently  https://test.com points to   on webserver A.

we have a new webserver B with an instance of  test.com running

On webserver A I created a IIS reverse proxy rewrite rule to redirect to  inbound and outbound.

It seemed to work, but then realised parts were not being redirected.  It seemed to be using the web.config file on server A but using content from server B.

Because the web.config file was in use the old sql server on A was being used and not the new one on B.

How can I redirect all requests to the site to B and then replies back to A.

I basically want a seamless experience - forwarding everything on to the new webserver not using the web.config on the old server.................... and defintly not the old sql server.

I cant configure routing policies at a firewall level as we don't have access to the router its a shared office etc.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dan McFaddenSystems EngineerCommented:
Using a reverse proxy may not be the best way to implement the migration to a new web server.

The reverse proxy process is just pulling the content from Webserver B thru Webserver A.  In this scenario A is functioning using its config then hitting B which is using its own config.  Therefore Webserver A is nothing more than a client to Webserver B... A is doing a HttpRequest from B, B processes the request, returns it to A and A forwards it on to the original requester.

Assuming that the site content is the same, I would use a HTTP redirect.

link:  http://technet.microsoft.com/en-us/library/cc732969(v=ws.10).aspx

Or using a little coding, you could also create a blank site under the old location (Webserver A on and configure the 404 error page to detect the inbound request and then do a redirect to the same location but on the new server.  This is the method that I've used in similar scenarios.

Some links:

custom pages 404 redirect & error display:  http://forums.iis.net/t/1195922.aspx?custom+pages+404+redirect+and+error+display

Create a Custom HTTP Error Response (IIS 7): http://technet.microsoft.com/en-us/library/cc753103(v=ws.10).aspx


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dan McFaddenSystems EngineerCommented:
Any update?
Spikeuk30Author Commented:
Thanks Dan.  

I managed to get the redirecting working in the end to an extent.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.