|
本帖最后由 chenhan 于 2009-9-20 22:50 编辑
1、出于SEO考虑,想把有些页面可以用HTML后缀访问,看了手册发现设置了$config['url_suffix'] = ".html"就能实现以HTML后缀访问;可是问题来了,在分页地址也自动加了html,变成了/zufang/index.html/1,这个好像不大好吧,请问有什么解决的办法可以变成:/zufang/index/1
2、另外请问大家做站有设置这个成为HTML吗?还是通过REWRITE来实现伪静态的呢
代码贴出来大家看看:
$this->load->library('pagination');//分页类
$config['base_url'] = site_url('/qiuzhu/index'); //注意"index"必须要.
$config['total_rows'] = $this->qiuzhum->get_qzcount('61');//数据总行数
$config['per_page'] = 15; //每页显示数
$config['uri_segment'] =3;
$config['num_links'] = 6;
$config['full_tag_open'] = '<p>';
$config['full_tag_close'] = '</p>';
$config['first_link'] = '首页';
$config['last_link'] = '尾页';
$config['next_link'] = '下一页';
$config['prev_link'] = '前一页';
$this->pagination->initialize($config); //初始化分页
$data['pagelink'] =$this->pagination->create_links();
$StartRow = 0; //开始显示记录的编号
if($this->uri->segment(3)){ //如果为空,则表示第1页
$StartRow = $this->uri->segment(3); //获得开始显示的记录编号
}
$data['qzdata']=$this->qiuzhum->get_qzlist('61',$StartRow,$config['per_page']);
$this->load->view('qiuzhu',$data); |
|