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
Table of contents 1. Two-way binding 2. Will the ...
01. Command Overview The paste command will merge...
Microsoft IIS IIS (Internet Information Server) i...
Before starting the main text of this article, yo...
This article describes how to export and import ....
This article mainly introduces the solution to th...
1. Compatibility As shown below: The compatibilit...
1. Download the pip installation package accordin...
The author of this article @子木yoyo posted it on hi...
MySQL Bin log data recovery: accidentally delete ...
This article example shares the specific code of ...
Table of contents How to flatten an array 1. Usin...
After installing MySQL, enter mysql -u root -p in...
This database query statement is one of 50 databa...
JSONObject is just a data structure, which can be...