1、要隐藏Thinkphp项目中index.php文件名,需在config.php中设置'URL_MODEL'=>2,并且需要在.htaccess 中隐藏index.php,前者依赖于后者,否则可能导致Thinkphp项目中模块无法正常访问。 http://localohost/News/view/id/45.html 复制代码 但这并不能满足我们的URL优化效果,因为更好的SEO优化地址可能是这种形式: http://localohost/News/2009-11-04/45.html cufflinks wholesale这就需要我们更好的手动的去做为静态了。
RewriteRule ^News/(.*)/([0-9]+)\.html$ /News/view/id/$2 复制代码 结果提示找不到模块,并且在根目录下的Discuz论坛为静态也失效,看来隐藏index.php后果很严重。
RewriteRule ^News/$ index.php/News/ RewriteRule ^News/category([0-9]+).html$ index.php/News/category/classid/$1 RewriteRule ^User/$ index.php/User/ RewriteRule ^News/(.*)/([0-9]+)\.html$ index.php/News/view/id/$2 …… discount nike air shoes RewriteRule ^News/category([0-9]+).html$ index.php?m=News&action=category&classid=$1 复制代码
|
|