我的页面中 实现伪静态页面时这样 的
http://zuche.17u.cn/car-jieji-book-tc-6011-638.html 这个是正常显示
可是后面的两个参数互换后既然页能进去页面,不过进去后显示的内容是不对的 ,而且有的是空的
http://zuche.17u.cn/car-jieji-book-tc-638-6011.html
请问这到底是为什么呢?我在本地测试也是这样,而且本地的缓存也删除掉了
http://zuche.17u.cn/car-jieji-book-tc-6011-638.html 这个是正常显示
可是后面的两个参数互换后既然页能进去页面,不过进去后显示的内容是不对的 ,而且有的是空的
http://zuche.17u.cn/car-jieji-book-tc-638-6011.html
请问这到底是为什么呢?我在本地测试也是这样,而且本地的缓存也删除掉了
void IHttpHandler.ProcessRequest(HttpContext context)
{
//string path = context.Request.PhysicalApplicationPath;
string path = context.Request.Url.AbsolutePath;
path = GetLastPath(path);
string[] infos = GetInfos(path);
if (infos.Length == 4)
{
double dynamicSize = 1;
try { dynamicSize = double.Parse(infos[0]); }
catch { }
string name = infos[1];
string fontType = infos[2];
string imageName = infos[3];
name = context.Server.UrlDecode(name);
fontType = context.Server.UrlDecode(fontType);
fontType = GetFontNameById(fontType, context);
imageName = context.Server.UrlDecode(imageName);
Show(name, fontType, imageName, context,dynamicSize);
}
}
因为你的infos里面的内容都是数字,因为可以互相转换的,你仔细看看自己的这个方法是怎么处理伪静态的
<LookFor><![CDATA[~/(\d+)-(.*)-(.*)-(.*)\.html]]></LookFor>
<SendTo><![CDATA[~/?A=$1&B=$2&C=$3&D=$4]]></SendTo>
</RewriterRule>比如这样,对应起来的参数。。
Url="^~/u/(\d+)/(\d+).html"
to="~/u/Default.aspx?user_id=$1&artcleid=$2"