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: Official documentation: 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! Double-click to enter its rule panel: 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: 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:
|
<<: Native js to achieve seamless carousel effect
>>: mysql 5.7.11 winx64.zip installation and configuration method graphic tutorial
I developed a project some time ago. I used the f...
<br />It has been no more than two years sin...
There are many purposes for exporting MySQL data,...
background: Because the server deployed the flask...
Table of contents 1. React Basic Usage Notable Fe...
1. Introduction to compression and packaging Comm...
Generally speaking, the mouse is displayed as an u...
Table of contents Scenario Task idea analyze Conc...
Preface In daily development, we often encounter ...
Mysql is a popular and easy-to-use database softw...
Preface Not long ago, I saw an interesting proble...
Text shadow text-shadow property effects: 1. Lowe...
Table of contents Preface 1. Local port forwardin...
Anyone who has a little knowledge of data operati...
I encountered a requirement to customize shortcut...