重写器部分定义如下:
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
然后<rewriter>
元素看起来像这样:
<rewriter>
<if header="Host" match="^example.com">
<redirect url="~/(.*)" to="http://www.example.com/$1" />
</if>
<!-- some other rules -->
</rewriter>
现在,我有大约 2000 个需要重定向到其他域的 url。我的Web.config
文件本身就足够大了,但是当我将这 2000 个网址放入其中时,我得到:Cannot read configuration file because it exceeds the maximum file size
错误消息。如果我将这些数据放入其他配置文件中,那么我如何从中引用它Web.config
?
我的应用程序在 ASP.NET 2.0 上运行并使用此包:https ://www.nuget.org/packages/Intelligencia.UrlRewriter进行 url 重写。