[eluser]Dionysius[/eluser]
[quote author="coolfactor" date="1196348953"]First off, the function itself should be written without making any assumptions about custom routes.
That means this line:
Code:
$sec_id = (int)$this->uri->segment(2);
...should be changed to:
Code:
$sec_id = (int)$this->uri->rsegment(3); // rewritten-segment
...or get the parameters from the function arguments:
Code:
function index($sec_id = 0, $start = 0) {
Both ways will isolate the custom routing from the function definition.
[/quote]
Done. But it didn't change anything.
[quote author="coolfactor" date="1196348953"]
I suspect the problem is happening with this redirect:
Code:
if (!$data['articles']) redirect('');
[/quote]
I did it yesterday. See this thread from the beginning. $data['articles'] is not empty when $sec_id == 1 or 2.