我实现http://www.XXX.com/odp/index.aspx?domain=str
而实际打开的网址是:http://www.xxx.com/odp/str/ (这样成功不了)
http://www.xxx.com/odp/str.aspx (这样成功)在asp.net中,我是用微软件自己提供的rewrite.dll 文件.但不知为何总是成功不了.其中我bin目录和web.config 文件/根目录和odp目录都测试放了,但还是不行.希望遇到过同样的问题的朋指点.
web.config 文件如下:<?xml version="1.0"?><configuration> <configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="~/odp/(.+).aspx" to="~/odp/products.aspx?category=$1" />
<rewrite url="~/odp/(.+)" to="~/odp/index.aspx?domain=$1" / </rewriter>
</configuration>
而实际打开的网址是:http://www.xxx.com/odp/str/ (这样成功不了)
http://www.xxx.com/odp/str.aspx (这样成功)在asp.net中,我是用微软件自己提供的rewrite.dll 文件.但不知为何总是成功不了.其中我bin目录和web.config 文件/根目录和odp目录都测试放了,但还是不行.希望遇到过同样的问题的朋指点.
web.config 文件如下:<?xml version="1.0"?><configuration> <configSections>
<section name="rewriter"
requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="~/odp/(.+).aspx" to="~/odp/products.aspx?category=$1" />
<rewrite url="~/odp/(.+)" to="~/odp/index.aspx?domain=$1" / </rewriter>
</configuration>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货