【发布时间】:2014-05-05 04:42:11
【问题描述】:
我有以下 URL 和代码来将 URL 更改为我在 URL 中的自定义名称。它不会返回任何错误,但 URL 不会更改。
I want the output like this
From : Frm_AdminHome.aspx?MainPage=AdminDashboard&Type=1&Role=r0LnJW8xTBkMh3DZ3ip3Jyt2o98/krx7
To : Frm_AdminHome/
我的 Webconfig 代码在这里。
Frm_AdminHome.aspx?MainPage=AdminDashboard&Type=1&Role=r0LnJW8xTBkMh3DZ3ip3Jyt2o98/krx7 //Query string will be change in every time.
<configSections>
<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
</configSections>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime requestValidationMode="2.0" />
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
</httpModules>
</system.web>
<rewriter>
<rewrite url="~/Frm_AdminHome/(.+).aspx" to="~/Frm_AdminHome.aspx" />
</rewriter>
【问题讨论】:
标签: asp.net c#-4.0 url-rewriting web-config c#-3.0