简体   繁体   English

在后面的代码上编写重写规则

[英]Write Rewrite rules on code behind

I'm using url rewrite module to IIS ( http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module ) and i want do dynamically add the rules based on a rules repository, instead of statically create them on web.config. 我正在使用URL重写模块到IIS( http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module ),并且我想根据以下内容动态添加规则规则存储库,而不是在web.config上静态创建它们。

How can i achieve this? 我怎样才能做到这一点?

Thanks 谢谢

You can use custom providers like DBProvider and FileMapProvider and then create a job that reads your repository and fills the DB/file with your custom rules. 您可以使用DBProvider和FileMapProvider之类的自定义提供程序,然后创建一个读取存储库并使用自定义规则填充数据库/文件的作业。 Check out this article for more information. 请查看本文以获取更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM