伪静态的问题
http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index.html/2为什么做伪静态时,会这样,后面那个2是分页的页码。
想弄成这样的地址?
http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index/2.html spt119 发表于 2014-7-20 22:31
想弄成这样的地址?
http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index/2.html
这种伪静态怎么做的?
这样伪静态,需要调整几个地方:
1.需要调整config.php文件中的url_suffix,设置成你想要的(默认是空值)
2.需要在分页类中做设置,否则分页类会不正常
3.base_url和site_url也需要调整
4.如果使用CI的缓存机制,输出类也需要调整。
建议用rewrite调整,而不是调整CI。否则,问题会层出不穷。不建议。
页:
[1]