Pagination Problem with mod_rewrite

Reply Tue 8 Jun, 2004 03:48 am
Has anybody got a fix for this?

Here are the main parts of the code I'm using:
page_header.php code
Code:if ( !$userdata['session_logged_in'] )
function replace_for_mod_rewrite(&$s)
$urlin =
$urlout = array(
$s = preg_replace($urlin, $urlout, $s);
return $s;

mod_rewrite code
Code:RewriteEngine On
RewriteRule ^forums.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 2 • Views: 2,491 • Replies: 3
No top replies

Craven de Kere
Reply Tue 8 Jun, 2004 09:38 am
I looked at your site and saw no pagination at all.

But the pagination does, in fact, work. Test it on this board.

Whatever your problem is, it is due to code from your previous mods.
0 Replies
Patrick B
Reply Wed 9 Jun, 2004 04:51 am
Hi Craven
I hid the pagination so it didn't confuse visitors. Is there a part of the code I posted above that I could hack out? I don't mind if some of the URL's are not rewritten but I do feel the guest visitors need the pagination. I have tried taking a few line of code out but I can't figure out which lines relate to the pagination.

I suppose worst-case scenario I could just take the mod_rewrite hack out.
0 Replies
Craven de Kere
Reply Wed 9 Jun, 2004 09:47 am

Like I said, the code I released in my mod does in fact work perfectly with pagination. I did not audit the code you posted but if it is from my mod it should work.

If it does not work you have some code that is conflicting with it.
0 Replies

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
  1. Forums
  2. » Pagination Problem with mod_rewrite
Copyright © 2023 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 09/23/2023 at 09:36:56