Http Redirect with Query string in IIS 7

1 minute read

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:

IIS

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):

httpRedirect