This article is a mirror article of machine translation, please click here to jump to the original article.

View: 3506|Reply: 1

[Web] IIS URL Rewrite Module Rule Clearing

[Copy link]
Posted on 1/15/2023 5:39:51 PM | | | |
Requirements: When publishing a project to a subdirectory of the IIS site, the URL route rewriting module in web.config will report a 500 error because the rule name is the same as the parent directory.

nginx pseudo-static rules
https://www.itsvse.com/thread-7810-1-1.html

IIS URL Rewrite 2.1 enables web administrators to create powerful rules for URLs that are easier for users to remember and search engines to find. By using rule templates, rewriting mappings, . NET provider and other features integrated into IIS Manager, Web administrators can easily set up rules to define programmatic rules for behavior based on HTTP headers, HTTP response or request headers, IIS server variables, and even complex URL rewrites. Additionally, web administrators can perform redirects, send custom responses, or stop HTTP requests based on the logic expressed in the rewrite rule.

First, the IIS URL Rewrite module needs to be installed separately, download the URL Rewrite module 2.1 download:The hyperlink login is visible.

Modify the web.config file and add rules for testing, as follows:




If the subdirectory hasRules with the same name, a 500 error will be reported as follows:

500 URL Rewrite Module Error.




Solution 1

Modify the rule name as shown in the following figure:





Solution 2

Remove a single rule or clear all rules.

Remove a single rule, configured as follows:

Clear all rules with the following configuration:

(End)




Previous:Nginx load balancing addresses the backend SESSION single point issue
Next:[Turn]. NET Core
Posted on 1/15/2023 10:58:28 PM |
Learn it
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com