Http Redirect with Query string in IIS 7

In the last couple of years I have had several url’s for my blog:

When I migrated my blog to my own Virtual Private Server I placed all of my articles on SharePoint Foundation. In order to also access my blog with the other url’s I created some alternate access mappings and changed the bindings within IIS.

But what I really wanted was a Http redirection with a 301 status code. If you enable this by default in IIS you will be redirected to the top level. But it is also possible to redirect with the query string.

Step 1:

Create a new website and add the binding you want.

Step 2:

Click on the website. In the feature view you will find Http redirect:


Step 3:

Add the url you want to redirect to and add “$V$Q”. To pass the query string. Also select “Redirect all request to exact destination.

From the dropdown choose Permanent (301):


7 Replies to “Http Redirect with Query string in IIS 7”

  1. Thank you for this post it solved an issue I was having. None of the other articles I read mentioned checking the box marked “Redirect all requests to the exact destination”

  2. Thank you for this, I just had my new domain in the destination box and the “exact destination” box unchecked, which worked for most of my pages. I only just realized that didn’t include query strings.

    Just wondering where the documentation is for this? Or how you figured it out? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.