Pagination with custom page/mod

phpBB3 SEO Advanced mod Rewrite support forum.
This mods performs URL rewriting for phpBB, injecting forums and topic titles in their URLs.

Moderator: Moderators

Pagination with custom page/mod

Postby Mavicant » Fri Mar 13, 2009 11:17 pm

I really hope that this is the right place to post this. I have both the Advanced SEO mod installed, as well as the Zero duplicate one. I searched these forums for similar issues, and the closest thing I came up with was this: A Mods Pagination - Not Redirecting

However, it's only semi-applicable to me since I'm not modifying the memberlist, but rather a custom page.

Here's my custom page, minus all the sql stuff.

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = '../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

// Start session management

* Set some variables
$start   = request_var('start', 0);
$number  = 15;

// sql stuff here


   'PAGINATION'          => generate_pagination(append_sid("{$phpbb_root_path}roster/index.$phpEx", ""), $total_results, $number, $start),
   'PAGE_NUMBER'         => on_page($total_results, $number, $start),
   'TOTAL_RESULTS'    => $total_results,

page_header('Player Roster');

    'body' => 'player_roster.html',



Now this works alright as the URLs in the pagination show up as - etc.

However, whenever I try to alter the "generate_pagination" function, the URLs like to change to the extension pagexx.html, which of course aren't existing pages for my script. Is there an easy way to make it so that the URLs are something like: or - and actually have the pagination function write them out correctly that way?

Thanks for your time. :)
Posts: 5
Joined: Wed Mar 11, 2009 7:47 am


Re: Pagination with custom page/mod

Postby dcz » Mon Mar 16, 2009 10:31 am

Why using isn't an option ?

Cause if so, you'd just need to add an extra rewriterule to handle this extra case, something like :
Code: Select all
RewriteRule ^roster/(page([0-9]+)\.html)?$ roster/index.php?start=$2 [QSA,L,NC]

Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
Posts: 21451
Joined: Fri Apr 28, 2006 9:03 pm

Re: Pagination with custom page/mod

Postby Mavicant » Mon Mar 16, 2009 8:45 pm

Ahh, d'oh. I guess pagexx.html is an option. For some reason it just really hadn't crossed my mind.

I've got this thing all fixed now. Thank you. :)
Posts: 5
Joined: Wed Mar 11, 2009 7:47 am

Return to Advanced SEO URL


  • Related topics
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests