urlrewriter 无法找到资源

来源:百度知道 编辑:UC知道 时间:2024/06/08 08:07:22
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter" />
</configSections>

<RewriterConfig>
<Rules>
<RewriterRule>
<LookFor>~/YMJBBS/Index(\d{1,8})\.aspx</LookFor>
<SendTo>~/YMJBBS/Index.aspx?ID=$1</SendTo>
</RewriterRule>
</RewriterConfig>

<system.web>

上面是web.config里面的配置,但运行老是出现无法找到资源,错误是404.文件路径都正确。我就把dxbbs从他的根目录移到我的网站根目录下就出这个问题。不用url重写的连接打开都没问题。URLRewriter.dll这个文件也已经引用过了,郁闷,请高手指点

“把dxbbs从他的根目录移到我的网站根目录下就出这个问题”
应该是这一部哪出错了吧,你的LookFor、SendTo都没错啊

引用过了
??
iis中添加了吗

<LookFor>~/YMJBBS/Index(\d{1,8})\.aspx</LookFor>

Index(\d{1,8})目录是不行的。