我的页面中 实现伪静态页面时这样 的
http://zuche.17u.cn/car-jieji-book-tc-6011-638.html  这个是正常显示
可是后面的两个参数互换后既然页能进去页面,不过进去后显示的内容是不对的 ,而且有的是空的
http://zuche.17u.cn/car-jieji-book-tc-638-6011.html
请问这到底是为什么呢?我在本地测试也是这样,而且本地的缓存也删除掉了

解决方案 »

  1.   

    car-jieji-book-tc-6011-638 这些实际上是参数值,举个例子car-1-2-3.html 可能真实的地址为 xxx.aspx?a=car&b=1&c=2&d=3你交换参数的位置,实际上也把参数值效换了,数据当然不对了.
      

  2.   

    <add  verb="*" path="Sign/*.jpg" type="AH.IP866.Signature.SignHttpHandlers,AH.IP866.Signature" />
    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里面的内容都是数字,因为可以互相转换的,你仔细看看自己的这个方法是怎么处理伪静态的
      

  3.   

    <RewriterRule>
            <LookFor><![CDATA[~/(\d+)-(.*)-(.*)-(.*)\.html]]></LookFor>
            <SendTo><![CDATA[~/?A=$1&B=$2&C=$3&D=$4]]></SendTo>
    </RewriterRule>比如这样,对应起来的参数。。
      

  4.   

    urlrewriter是如何编写的
    Url="^~/u/(\d+)/(\d+).html" 
    to="~/u/Default.aspx?user_id=$1&amp;artcleid=$2"