asp.net 伪静态处理

来源:百度知道 编辑:UC知道 时间:2024/06/14 10:07:50
我的是这样处理的

<section name="CustomConfiguration" type="URLRewriter.Config.UrlsSection, URLRewriter" />

<CustomConfiguration>
<urls>
<add virtualUrl="~/QQlogin.*" destinationUrl="~/QQlogin.aspx" />

<add virtualUrl="~/AddLog.*" destinationUrl="~/AddLog.aspx" />

<add virtualUrl="~/Enrol.*" destinationUrl="~/Enrol.aspx" />

<add virtualUrl="~/Index" destinationUrl="~/Index.aspx" />

<add virtualUrl="~/Logshow-(\d+).*" destinationUrl="~/Logshow.aspx?typeid=$1" />

<add virtualUrl="~/UpdateLog-(\d+).*" destinationUrl="~/UpdateLog.aspx?id=$1" />

<add virtualUrl="~/Index-(\d+).*" destinationUrl="~/Index.aspx?ClassID=$1" />
</urls>
</CustomConfiguration>

<rewriter>
<rewrite url="~/login_ok.html" to="login_ok.aspx"/>
<rewrite url="~/login.html" to="login.aspx"/>
<rewrite url="~/reg.html" to="reg.aspx"/>
<rewrite url="~/index.html" to="index.aspx"/>
<rewrite url="~/class-(.+).html" to="class.aspx?TypeID=$1"/>
<rewrite url="~/flv-(.+)-(.+).html" to="flv.aspx?ProductID=$1&Type=$2"/>
</rewriter>

我是这样做的,没什么问题