Welcome Guest, Not a member yet? Register   Sign In
Pagination and .htaccess

I am having a problem with pagination on my production site, but not on my development site.

In the pagainataion links on my dev site I get http://localhost/<sitename>/index.php#, but in production I get http://<domain>/<sitename>/#. Whenever I click a pagination link in production nothing happens the page is not advanced. I think this has something to do with mod_rewrite and my .htaccess, but I don't know enough about it to make heads and tails.

This is my .htaccess file
DirectoryIndex welcome.php index.php welcome.html

<Files "config.php">
Order Allow,Deny
Deny from All

<Files "database.php">
Order Allow,Deny
Deny from All

RewriteEngine on
RewriteCond $1 !^(index\.php|images|js|styles|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Can I add another rule here to get pagination links that will work? Or is there another solution?

In my experience, that is more often a problem with your pagination config. If it is not looking for the correct uri_segment, then it won't do much.

$pages['total_rows'] = $query->num_rows();
$pages['num_links'] = 3;
$pages['per_page'] = 10;
// make sure that the uri_segment that passes the pagination offset is correct
// by comparing it to your url and testing it with different numbers
$pages['uri_segment'] = 4;

Theme © iAndrew 2016 - Forum software by © MyBB