我估计会不会是这样的
例如
localhost/list.php/gonggao.html
当程序运行的时候,执行list.php。后面的gonggao.html,截取下来,以此别名查询存在数据库里的id记录,
然后在调用出内容?

解决方案 »

  1.   

    差不多是这个意思,入口处有个路由专门分析url,根据斜杠拆开,然后去数据库查别名,该去哪去哪
      

  2.   

    PATH_INFO
    你不会连这个也不知道吧
      

  3.   

    没用过wordpress,不过,仅仅是靠Path_info?Contains any client-provided pathname information trailing the actual script filename but preceding the query string, if available. For instance, if the current script was accessed via the URL http://www.example.com/php/path_info.php/some/stuff?foo=bar, then $_SERVER['PATH_INFO'] would contain /some/stuff.试了下rewrite之后好像得不到path_info?
    而且看yii关于url这块的代码有不少
    意思差不多,就是感觉简单了.
    关注
      

  4.   

    谢谢,我已经实现了功能了
    http://demo.momocms.com/contents/jianjie.html