IIS 7.5 uses URL Rewrite module to achieve web page redirection

IIS 7.5 uses URL Rewrite module to achieve web page redirection

We all know that Apache can easily set rewrites for web pages or websites in the configuration file, but I recently took over a group of IIS servers and found that there was simply no configuration file for me to write, but I wanted to implement the web page rewrite function. What to do? I googled it and found the content decisively.

IIS URL Rewrite module:

Official download address:
http://www.iis.net/downloads/microsoft/url-rewrite

Official documentation:
http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module

Download the installation package to the IIS server and install it. It will automatically detect the installation location of IIS. It is very simple until the end. After that, reopen IIS Manager and you will clearly see a component in the directory of each website: URL Rewrite!

image

Double-click to enter its rule panel:

image

You can directly click Add rule in the upper right corner to add rules.

Here we simply do a rewrite.

Target:

When a user visits www.a.com/aaa, the file named aaa.html is automatically accessed.

accomplish:

Click Add rule, then select Blank rule, and then fill in the rules as shown:

image

Name: Give it a name. We will name it "set aaa to aaa.html"

Requested URL: Select 'Matches the pattern'

Using: Select 'Exact Match' (If your regular expressions are good enough, you can also use regular expressions for matching)

Pattern: Enter the matching content 'aaa' (Since it is an exact match, we only need to enter the exact matching content)

Action type: Select rewrite.

Rewrite URL: Enter the aaa.html we need

Click Apply in the upper right corner to save.

IIS has supported this URL Rewrite module since IIS 7.0. It can not only define the redirection of a single link, but also the redirection of the entire directory. It can be said to be powerful and easy to use. Highly recommend it to everyone!

You may also be interested in:
  • How to redirect URL using nginx rewrite
  • How to configure page rewriting under IIS (using the url-rewrite2 plug-in to remove the page suffix)
  • Solution to the problem of failure to install PHP Manager, ARR3.0 or URL Rewrite 2.0 in Windows Server 2016
  • How to install and use URL Rewrite tool in IIS8
  • UrlRewrite url rewriting detailed explanation and examples
  • Detailed explanation of nginx rewrite and location according to URL parameters
  • How to configure pseudo-static URLs in IIS7.5 on Windows Server 2008R2 (urlrewrite)
  • Example of using rewrite to rewrite URL to achieve pseudo-static in Nginx server
  • Analysis of the concept principle and usage of UrlRewrite

<<:  Native js to achieve seamless carousel effect

>>:  mysql 5.7.11 winx64.zip installation and configuration method graphic tutorial

Recommend

Detailed explanation of Vue two-way binding

Table of contents 1. Two-way binding 2. Will the ...

How to use Linux paste command

01. Command Overview The paste command will merge...

Steps to configure IIS10 under Win10 and support debugging ASP programs

Microsoft IIS IIS (Internet Information Server) i...

Sample code for converting video using ffmpeg command line

Before starting the main text of this article, yo...

How to export and import .sql files under Linux command

This article describes how to export and import ....

Solve the compatibility issue between MySQL 8.0 driver and Alibaba Druid version

This article mainly introduces the solution to th...

Understand the use of CSS3's all attribute

1. Compatibility As shown below: The compatibilit...

How to install pip package in Linux

1. Download the pip installation package accordin...

Explanation on whether to choose paging or loading in interactive design

The author of this article @子木yoyo posted it on hi...

Vue development tree structure components (component recursion)

This article example shares the specific code of ...

js implements array flattening

Table of contents How to flatten an array 1. Usin...

Ubuntu View and modify mysql login name and password, install phpmyadmin

After installing MySQL, enter mysql -u root -p in...

The most complete 50 Mysql database query exercises

This database query statement is one of 50 databa...

Detailed explanation of JSONObject usage

JSONObject is just a data structure, which can be...