- Species Diversity
- Technical Reports
Simple HTTP Redirect with Querystring in IIS7
HTTP Redirect seems simple enough. Always was in IIS6 and in IIS7 there's even a button labeled HTTP Redirect that promises relative redirects. It looks like it'll be as easy Apache finally. That is until you try to redirect a querystring. Then everything bombs.
Turns out it still is relatively easy, except you have to know that Microsoft changed $S$Q to $V$Q. Why? $Ss and $Gs I suspect.
In our example we'll redirect all pages under http://olddomain.com/content to http://mydomain.com/content.
- Pick the virtual directory you want to redirect. e.g. http://olddomain.com/content
- Click HTTP Redirect under IIS in the IIS management console.
- In the HTTP Redirect Dialog:
- Check Redirect requests to this destination
- Enter your new path ending with $V$Q. e.g. http://mydomain.com$V$Q
- Counter-intuitively check Redirect all request to exact destination (instead of relative destination)
- Choose the appropriate Status Code (Permanent or Temporary)
- Apply Changes and Test
Posted by idfg-bthomas at 09/20/2010 in
What is this?
We use the IFWIS Blog to keep our staff, cooperators and the public updated on what we are working on, what's new and share tips about using our software and website.
The content of the IFWIS Blog is often highly technical, but we try our best to keep our posts accessible and jargon-free. When this is not possible, we'll link to other resources online to provide background. Thanks for reading and please follow our blog for updates.
- IFWIS RSS Feed
- Daily Email Digest (All Public Content)
- Or follow just one of the many topic-specific tag feeds or pages below.