为UrlRewriter.NET使用外部配置文件 [英] Using external config file for UrlRewriter.NET
问题描述
我正在使用 UrlRewriter.NET 库为我的asp.net网站实现URL重写.当前正在从
I'm using the UrlRewriter.NET library to implement url rewriting for my asp.net website. The rewriting rules are currently being read from the web.config
file like this
<rewriter>
<rewrite url="/test-web-page" to="~/realwebpage.aspx"/>
</rewriter>
如何使库从另一个文件而不是web.config
中读取我的重写规则?
How do I make the library read my rewriting rules from another file rather than the web.config
?
推荐答案
是的,可以-在此页面上提到 http://urlrewriter.net/有趣的是看他们的示例,但没有确切说明要这样做.但是我在他们的支持论坛上做了一些挖掘,发现了这个例子:
Yes you can - it is mentioned here on this page http://urlrewriter.net/ interesting looking at their examples the do not specify exactly hw to do it. But I did some digging on their support forum and found this example:
<rewriter configSource="YOURREWRITEFILE">
</rewriter>
完整的对话可以在这里阅读:
Full dialogue can be read here:
这篇关于为UrlRewriter.NET使用外部配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!