shibangzhou 发表于 2014-7-18 16:19:21

伪静态的问题

http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index.html/2

为什么做伪静态时,会这样,后面那个2是分页的页码。

spt119 发表于 2014-7-20 22:31:40

想弄成这样的地址?
http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index/2.html

一叶扁舟 发表于 2014-7-21 16:40:44

spt119 发表于 2014-7-20 22:31
想弄成这样的地址?
http://localhost/myphp/mywork/CodeIgniter_2.1.4/index/home/index/2.html

这种伪静态怎么做的?

spt119 发表于 2014-7-21 21:30:09

这样伪静态,需要调整几个地方:
1.需要调整config.php文件中的url_suffix,设置成你想要的(默认是空值)
2.需要在分页类中做设置,否则分页类会不正常
3.base_url和site_url也需要调整
4.如果使用CI的缓存机制,输出类也需要调整。
建议用rewrite调整,而不是调整CI。否则,问题会层出不穷。不建议。
页: [1]
查看完整版本: 伪静态的问题