HTTP Redirect in IIS 7.0

This is Syed Aslam Basha here from Information security and risk management team.

We had a website in pilot and the URL was applicaitonnamepilot. It was decided to move the website to production by removing the pilot from all the places in the website including URL as applicationname. But the customers and stake holders might have bookmarked the link, as they navigate they will get error page. To overcome this we can use HTTP redirect feature in IIS. I set up new website as applicaitonname and redirected the applicaitonnamepilot  URL to applicationname as:

  • Launch IIS manager by Start –> Run – > inetmgr and press enter
  • Click on the sites and navigate to the pilot website
  • Click on HTTP redirect
  • HTTP1
  • Click on checkbox “Redirect requests to this destination” and enter appropriate URL to be redirected to
  • HTTP2
  • Status code has three options
    • Found (302) : Tells the Web client to issue a new request to the location.
    • Permanent (301) : Tells the Web client that the location for the requested resource has permanently moved.
    • Temporary (307) : Tells the web client to resend POST data, which prevents a Web browser from losing data when the browser issues an HTTP POST request.
  • Select permanent (301)
  • Click on Apply in actions pane
  • HTTP3

The users hitting the pilot URL applicationnamepilot will be redirected to applicationame .

- Syed Aslam Basha ( syedab@microsoft.com )

Microsoft Information Security Tools (IST) Team

Test Lead

---------------------------------------------------------

Please leave a comment if the blog post has helped you.