复制代码 代码如下:
namespace URL
{
public class myrewritter : URLRewriter.BaseModuleRewriter
{
protected override void Rewrite(string requestedPath, HttpApplication app)
{
if (requestedPath.Contains("viewnews/2009/3/2.html"))
app.Context.RewritePath("/viewnews.aspx?id=2&year=2009&month=3");
else
app.Context.RewritePath("/here.aspx");
}
}
}
复制代码 代码如下:
<?xml version="1.0"?>
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<httpModules>
<add type="URL.myrewritter" />
</httpModules>
<compilation debug="true" />
<authentication mode="Windows" />
</system.web>
</configuration>
新闻热点
疑难解答
图片精选