CodeIgniter Forums

Full Version: Pagination - first page's link doesn't work, why?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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?

El Forum

[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.