Welcome Guest, Not a member yet? Register   Sign In
Pagination class issue
#1

[eluser]Christophe28[/eluser]
Hello,

For some strange, but probably obvious reason the pagination doesn't work in my application.

This is the code I use in the controller:
Code:
$this->load->library('pagination');

$config['base_url'] = 'http://www.myurl.com/photos/';
$config['total_rows'] = '640';
$config['per_page'] = '64';

$this->pagination->initialize($config);

This is the code I use in the view:
Code:
<?php echo $this->pagination->create_links(); ?>

When I surf to http://www.myurl.com/photos/ the pagination numbers are visible on the page, but then, when I click on of the numbers, the URL changes to http://www.myurl.com/photos/64/ and I get a 404 ...

Doesn't anybody know what I do wrong :-(

Thx!
#2

[eluser]OliverHR[/eluser]
Check this setting:

Code:
$config['uri_segment']
#3

[eluser]Christophe28[/eluser]
This gives the same result.

Any other suggestions?
#4

[eluser]OliverHR[/eluser]
Are you using .httaccess file?
#5

[eluser]Christophe28[/eluser]
I use nginx ...
#6

[eluser]OliverHR[/eluser]
Mmm. to sounds like a Rewrite rule issue, but I never had to work with NGinx.
#7

[eluser]Christophe28[/eluser]
Apparently you have to set the routes to use the pagination the way I use it.

I had to paste this in the routes.php file: $route['photos/(:num)'] = 'photos';




Theme © iAndrew 2016 - Forum software by © MyBB