Would you like to learn how to install the URL Rewrite module on IIS? In this tutorial, we are going to show you how to install the URL Rewrite module on the IIS server of a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019

Hardware List:

The following section presents the list of equipment used to create this tutorial.

Every piece of hardware listed above can be found at Amazon website.

Tutorial IIS – Installing the URL Rewrite module

Access the URL REWRITE website and download the installation package.

IIS URL REWRITE DOWNLOAD

Perform the URL REWRITE installation.

URL REWRITE INSTALLATION

Start the application named: IIS Manager.

Start IIS Windows

On the IIS Manager application, select your website.

On the right part of the screen, access the option named: URL Rewrite.

IIS - URL REWRITE - WEBSITE

On the top right part of the screen, click on the Add Rule option.

IIS URL REWRITE - ADD

Create a new Blank rule.

URL REWRITE BLANK RULE

To redirect a single URL, enter the following configuration:

• NAME – Enter a name to the new rule.
• REQUESTED URL – Matches the Pattern.
• USING – Exact Match.
• PATTERN – test1.html
• IGNORE CASE – Yes.

IIS URL REWRITE CONFIGURATION

On the Action area, configure the new destination:

• ACTION TYPE – REDIRECT.
• REDIRECT URL – https://google.com
• APPEND QUERY STRING – YES.
• REDIRECT TYPE – 301.

On the top-right part of the screen, click on the Apply option

IIS Redirect URL

To test the URL redirection, you may use the CURL command of a Linux computer.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, if a user tries to access an HTML page named TEST1, he will be redirected to the Google website.

Congratulations! You successfully configured the URL REWRITE module on the IIS server.