BenGriffiths / pdo-mysqli-pagination

A PDO & MySQLi PHP Pagination Class - PDO MySQLi Pagination class is a PHP pagination class that will work with either PDO, or MySQLi. The outputted pagination is served as a UL or as an array, and the options are extensive.
50 stars 27 forks source link

Trailing Slash Causes 404 #20

Closed tmblog closed 8 years ago

tmblog commented 9 years ago

With this rewrite RewriteRule ^tag/([^/]+)(/([0-9]+))?$ tag.php?tagslug=$1&page=$3 [NC,L] I always get a 404 if a trailing slash is present like this:

http://example.com/tag/colours/2/ or http://example.com/tag/colours/

however it's fine without the last slash on either URL. I've tested it without the pagination class and it works, this lead me to believe that it could be this class causing the 404. What could be the problem? Any help/suggestion/fix would be absolutely appreciated!

BenGriffiths commented 8 years ago

This class wouldn't cause a 404 - thats the server telling you it cannot find the page you are looking for. I'd re-check the regex in the rewrite rule.