What are the ways of dynamic url rewriting in IIS, asp.net web page. I know one of them is to add rules into config dynamically, but that has some disadvantages.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can also use custom rewrite providers with the IIS Url Rewrite Module. There is a good article on the subject here.
The DbProvider might be the most useful to you if you want dynamic rewrite rules.
回答2:
- Url Rewriting using IIS Url Rewriting Module
URL Rewrite Module 2.0
- Asp.Net Routing
ASP.NET Routing
- Urlrewriting.Net
UrlRewritingNet.UrlRewrite
I would recommend using ASP.Net Routing.