iishttp-redirect

301 Redirect for IIS


When I've used Apache, I used .htaccess to redirect a custom path to a certain page.

But my new site is hosted on a Windows server and I cant find any help on setting up redirects for old pages which have been deleted for new pages.

Example. When people visit

[domain]/ValveMonitoring/valveleak.php

They should be forwarded to

[domain]/valve-monitoring/midas-meter.php

Can someone help?


Solution

  • The easiest way to do this in IIS7 and beyond is to install the URL Rewrite module. Please see the following for documentation: https://www.iis.net/downloads/microsoft/url-rewrite

    You can download the URL Rewrite Module for IIS 7 from here and follow the prompts to install.

    Video: IIS URL Rewriter