今天我发现这个网站 是用.net写的,而写页面都是一个规则,应该是用的url重写吧??
各位知道是怎么实现的吗??
这个网址: 泰安二手房 http://www.taianesf.com 

解决方案 »

  1.   

    用URLRewriter,看看http://www.cnblogs.com/wu-jian/archive/2011/01/06/1927089.html
      

  2.   

    用网上别人的类库URLRewriter,或者自己写,用httphandler来实现
      

  3.   


    public class HTMLHandler : IHttpHandlerFactory
    {
        #region IHttpHandlerFactory 成员    public IHttpHandler GetHandler(HttpContext context, string requestType, string url, string pathTranslated)
        {
            string path = string.Empty;        PageHandlerFactory factory = null;
            IHttpHandler handler = null;
            //这里要对每一类url解析 取出参数 用HttpContext.Current.Items保存 取也是用这个取
            path = url.Replace("html","aspx");
            factory = Activator.CreateInstance(typeof(PageHandlerFactory), true) as PageHandlerFactory;
            handler = factory.GetHandler(context, requestType, path, pathTranslated);
            return handler;
        }    #endregion
    }
      

  4.   

    朋友,你看一下.net mvc 框架的书就知道了