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

Posted on 2014-08-02
Last Modified: 2014-11-14
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 points to   on webserver A.

we have a new webserver B with an instance of 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.
Question by:Spikeuk30
    LVL 25

    Accepted Solution

    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.


    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:

    Create a Custom HTTP Error Response (IIS 7):

    LVL 25

    Expert Comment

    by:Dan McFadden
    Any update?

    Author Closing Comment

    Thanks Dan.  

    I managed to get the redirecting working in the end to an extent.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    #SSL #TLS #Citrix #HTTPS #PKI #Compliance #Certificate #Encryption #StoreFront #Web Interface #Citrix XenApp
    Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
    This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
    Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now