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

The past two years with user experience

<br />It has been no more than two years sin...

Detailed explanation of several ways to export data in Mysql

There are many purposes for exporting MySQL data,...

Introduction to Linux File Compression and Packaging

1. Introduction to compression and packaging Comm...

HTML mouse css control

Generally speaking, the mouse is displayed as an u...

WeChat applet to achieve the revolving lantern effect example

Preface In daily development, we often encounter ...

MySQL 5.7 installation-free configuration graphic tutorial

Mysql is a popular and easy-to-use database softw...

How to update the view synchronously after data changes in Vue

Preface Not long ago, I saw an interesting proble...

Detailed explanation of CSS3 text shadow text-shadow property

Text shadow text-shadow property effects: 1. Lowe...

What is ssh port forwarding? What's the use?

Table of contents Preface 1. Local port forwardin...

MySQL5.7 parallel replication principle and implementation

Anyone who has a little knowledge of data operati...

Vue implements an Input component that gets the key display shortcut key effect

I encountered a requirement to customize shortcut...