このルートを定義しました:
$route['search/(:any)/(:num)/(:num)/(:num)/(:num)'] = "home/results/$1/$2/$3/$4/$5";
そして、results() 関数での私のページネーション:
$config['base_url'] = base_url().'/search/'.$data['keyword'].'/'.$data['1'].'/'.$data['2'].'/'.$data['3'].'/';
$config['per_page'] = 10;
$config['uri_segment']=6;
次のページのいずれかから最初のページに戻るときを除いて、うまく機能します-ブラウザで入力しているときのため、URLが見つかりません:
mysite.com/search/key/param1/param2/param3/0 (first page) -> works fine
しかし、最初のページに移動したいとき:
mysite.com/search/key/param1/param2/param3/10 (second page) =>
mysite.com/search/key/param1/param2/param3/ (fiest page - without "0" index at the end, pagination doesn't add it at the end)
URL が見つからない