Page x out of y doesnt work?

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators


Page x out of y doesnt work?

Postby frold » Wed Apr 23, 2008 5:59 pm

Hey,

I have a trouble on my board.

Eg if you go to: http://studmed.dk/studmed-debat.html you'll see that I have
Page 1 of 27 • 1, 2, 3, 4, 5 ... 27


But if you press on eg "2"

I get this link http://studmed.dk/studmed-debat-50.html and it just says:
The forum you selected does not exist.
frold
PR0
PR0
 
Posts: 95
Joined: Thu Apr 17, 2008 7:26 pm

Advertisement

Postby dcz » Thu Apr 24, 2008 8:13 am

Looks like you updated and did not update your .htaccess, please generate a new one, the forum rewriterule changed a bit (not the forum urls).

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

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

Postby frold » Thu Apr 24, 2008 8:48 am

Thank you for your answer!

But I already did so and now I did it again - but still the same result :-(

I have cleared the cache etc, so.....?
Code: Select all
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>
DirectoryIndex portal.php index.php index.html index.htm
# PORTAL
RewriteRule ^portal\.html$ /portal.php [QSA,L,NC]

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX
RewriteRule ^index\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^besked/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^bruger/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^bruger/([^/]+)/(topics|posts)/?(side([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^indlaeg([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^aktive-emner(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^ubesvaret(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^nyeindlaeg(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^holdet\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
frold
PR0
PR0
 
Posts: 95
Joined: Thu Apr 17, 2008 7:26 pm

Postby dcz » Thu Apr 24, 2008 9:02 am

Mm, could be the viewforum.php file then, if of course you updated.

If so, double check the file, there is some old code to delete in the update process, you may have kept it.

It should have this in the begining :
Code: Select all
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (empty($_REQUEST['f'])) {
   $phpbb_seo->get_forum_id($session_forum_id);
   if ($session_forum_id == 0) {
      header('HTTP/1.1 404 Not Found');
   } else {
      $_REQUEST['f'] = (int) $session_forum_id;
   }
}
// www.phpBB-SEO.com SEO TOOLKIT END
// Start session
$user->session_begin();
$auth->acl($user->data);

// Start initial var setup
$forum_id   = request_var('f', 0);
$mark_read   = request_var('mark', '');
$start      = request_var('start', 0);

$sort_days   = request_var('st', ((!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0));
$sort_key   = request_var('sk', ((!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'));
$sort_dir   = request_var('sd', ((!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'));


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

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

Postby frold » Thu Apr 24, 2008 10:19 am

I have that code already!

I run phpBB3 premodded 3.0.1
frold
PR0
PR0
 
Posts: 95
Joined: Thu Apr 17, 2008 7:26 pm

Postby dcz » Thu Apr 24, 2008 12:15 pm

How I see, the regex could be the guilty one, please replace :

Code: Select all
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


with :

Code: Select all
RewriteRule ^([a-z_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


I have to think of a better trick here, because this one will not allow numbers in forum URLs.

Should solve the issue for your case though.

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

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

Postby frold » Thu Apr 24, 2008 12:59 pm

dcz wrote:How I see, the regex could be the guilty one, please replace :

Code: Select all
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


with :

Code: Select all
RewriteRule ^([a-z_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


I have to think of a better trick here, because this one will not allow numbers in forum URLs.

Should solve the issue for your case though.

++


It solved it.... (If it gives other errors I cant say as I havent crash tested it yet.....)
frold
PR0
PR0
 
Posts: 95
Joined: Thu Apr 17, 2008 7:26 pm

Postby dcz » Thu Apr 24, 2008 1:15 pm

Here is a better trick, it's only required for forum urls when virtual folder is not activated and when the suffix is not "/", replace :
Code: Select all
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


with :

Code: Select all
RewriteRule ^([a-z0-9_-]*[a-z_]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


will allow forum urls such as forum22-82url but not forum22-url58.

Will continue to look for a better fix for this ;)

And don't worry, this was not a crash, only a 404 ;)

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

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

Postby frold » Thu Apr 24, 2008 1:24 pm

just to be 100% sure - do I need both changes or only the last?
frold
PR0
PR0
 
Posts: 95
Joined: Thu Apr 17, 2008 7:26 pm

Postby dcz » Thu Apr 24, 2008 1:25 pm

Yes, it's a second version of the same fix, meant to be used instead of the first one, handles more cases.

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

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

Postby SeO » Fri May 16, 2008 4:14 pm

Here is a fix that will work in all case, we need to use two set of rewriterules in this case :
Replace :

Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))?\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]


with :


Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)\.html$ /viewforum.php?forum_uri=$1 [QSA,L,NC]


Works in all cases, but some will need to add paths in the rewriterule, this example as is is meant for a root install.
SeO
Admin
Admin
 
Posts: 6012
Joined: Wed Mar 15, 2006 9:41 pm

Thank you

Postby arbsoft » Sat May 24, 2008 1:59 am

Hi,

I had same problem here:
http://www.englishexperts.com.br/forum/ ... es-25.html

Your solution worked fine for me.

Tks a lot, you are the best!
arbsoft
 
Posts: 1
Joined: Tue May 20, 2008 1:53 am


Return to phpBB SEO Premod

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Ask Jeeves [Bot], Niecher and 3 guests


 
cron