I'm attempting to use the below reference to create a re-direct for my local site with no luck.
I want absolute links on my local site that point online to point to my local site instead.
example absolute link
[http://online.com/products]
when I click the local version I'd like it to redirect to:
[http://offline/products]
I want to preserve everything after the domain name and append it to the server (local) name so that when I click a link it will redirect to the local site and not the online version.
I've tried [http://offline$S] but that doesn't append the "suffix" /products the way I thought it should.
What's going on here?
Best Answer
An IIS redirect isn't going to work for you in this case. For those absolute links your
offline
IIS server is completely out of the picture. If you look in your IIS logs onoffline
you should see that none of those requests even make it to that server. Your browser will attempt to directly contactonline.come
itself and send the request there (by way of any proxy servers in the chain). IIS onoffline
never gets a chance to handle the request and therefore will not fire any redirect. For an IIS redirect to work the initial request must be served by your IIS server.To make this work you would need to get creative with dns or internal proxy servers.