数据查询:
Db::name('CmsAsks')->order($order)->paginate(8,false,[
'path'=>'page_[PAGE].html',
]);
修改.htaccess文件
RewriteRule ^([0-9A-Za-z_]*)/page_([0-9]+).html$ ask?page=$1
RewriteRule ^([0-9A-Za-z_]*)/page_([0-9]+).html$ ask?page=$1
根据自己的url进行修改
效果:
原url:
www.xxx.com/ask?page=2
修改后:
www.xxx.com/ask/page_2.html