[eluser]ovicostea[/eluser]
Thanks for response.
Here is an example of my link:
tasks/index/page/4 or
tasks/index/status/progress/page/4 or
tasks/index/status/all/by/johnny/page/4
Because I don't know what segment will be the page, I decided to use $this->uri->uri_to_assoc() and get the page from array
$config['cur_page'] = $arr['page];