CodeIgniter Forums
Pagination - first page's link doesn't work, why? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Pagination - first page's link doesn't work, why? (/thread-53765.html)



Pagination - first page's link doesn't work, why? - El Forum - 08-08-2012

[eluser]peekk[/eluser]
Hello, I use pagination library on my site, my config is here:
Code:
$data['url_keyword'] = url_title($keyword, '_');
$config['base_url'] = base_url().'image/'.$data['url_keyword'].'/';
$config['per_page'] = 1;
$config['uri_segment']=3;

my urls are: mysite/image/keyword/1 (page2), mysite/image/keyword/2 (page3), mysite/image/keyword/3 (page4), mysite/image/keyword/4 (page5)

When I'm on page 2 (mysite/image/keyword/1) and click previous - it gets me into mysite/image/keyword/ - which doesnt work, but mysite/image/keyword/0 WORKS. Library just doesn't add zero at the end of url.

how to fix it?


Pagination - first page's link doesn't work, why? - El Forum - 08-08-2012

[eluser]Aken[/eluser]
What exactly is not working? Are you receiving a 404 error? Is your query broken? Is there an error? Probably a simple issue, but we need more info.