Old rewriting pagination links

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

Moderator: Moderators

Old rewriting pagination links

Postby sopi » Mon Apr 06, 2009 11:23 am

Hi there,
First things first: This mod is just AWESOME and it works like a charme :D

Second: I don't know if this is the write place to ask. I hope so *crossing fingers*

Then: I didn't realize this "error", since I checked google Webmastertools. It told me, that it cannot reach about 600 sites.

about 99% of the unreachable pages are of this form:
-http://www.example.com/sometitle-t4972-s15.html

I double checked and it came out, that the proper form would be:
-http://www.example.com/sometitle-t4972-15.html
(The "s" is stripped in front of the last number)

How can I add a rewrite rule for this case to my htaccess file so google can find this pages again?

Thx and Cheers
sopie ;)
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Advertisement

Re: Old rewriting pagination links

Postby dcz » Tue Apr 07, 2009 8:14 am

So the -sxx pagination param looks like coming from a url rewriting mod you used to use on your forum before ours.

The good thing is that it will be very easy to redirect properly thanks to the zero duplicate.
All you'll need to do will be to alter this rewirterule (that may look a tiny bit different in your .htaccess) :
Code: Select all
# 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]

Just replace it with :
Code: Select all
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-s?([0-9]+))?\.html$ viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]

I just added :
Code: Select all
s?

To take care of both cases at once, -xx and -sxx for the pagination parameter.

The only "hard" part will be that you will have to maintain this tweak among updates to make sure that these links (that could have been posted somewhere) will always work).

++
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: Old rewriting pagination links

Postby sopi » Sat Apr 18, 2009 8:52 am

Hi there,
sorry for the late reply: THANK YOU SO MUCH! It works like a charm (again) :mrgreen:
I am impressed over and over again how genius this tool is, and how fast, generous and problem solving your answers!!
*bow*
sopi ;)

PS: I have a "how to update" file anyways. Just put your instructiones into it, and will now repeat'em everytime I update 8)
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby dcz » Sat Apr 18, 2009 1:35 pm

;)
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: Old rewriting pagination links

Postby sopi » Fri May 01, 2009 3:12 pm

Hi there,
okay, as I have mentioned, the new rule works perfectly.
But now I found that the same thing goes wrong with forum-urls :roll:

What works is:
-http://www.example.com/forum-f1-1550.html

What NOT works is:
-http://www.example.com/forum-f1-s1550.html
(the difference is the "s" again)

So I thought I am smart and found this line:
# FORUM WITHOUT ID & DELIM

in the .htaccess file and changed one line afterwards as follows:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
#ORIGINAL: RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteRule ^([a-z0-9_-]+)(-s?([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]

(I just put the s? in the same position as you did before for the topics)

But this didn't change anything, same things work and don't work for the forums. So I have no clue what could do the trick, and I need help again :oops:

Thanks for your patience.
Cheers
sopi ;)

EDIT: And jet another error that occured to me:
-http://www.example.com/profile.php?mode=viewprofile&u=2
will result in a 404 page too (no clue how this come). 2 is my user-id
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby sopi » Sat May 02, 2009 6:59 pm

Oh I just saw why the Error occures which I postet in my last post under EDIT:

It's profile.php instead of memberlist.php ....

Is there a workaround for both of my problems??

Cheers
sopi :)
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby sopi » Wed May 06, 2009 5:08 pm

*push* ? :oops:
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby dcz » Mon May 11, 2009 1:19 pm

For the profile thing, try to add :
Code: Select all
# PHPBB2 PROFILES
RewriteRule ^profile.php$ /memberlist.php [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
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: Old rewriting pagination links

Postby sopi » Mon May 11, 2009 2:39 pm

Brilliant!
It works perfectly.
Thank you so much!

Do you maybe have a clue, what I did wrong with the old forums url?? :
sopi wrote:What works is:
-http://www.example.com/forum-f1-1550.html

What NOT works is:
-http://www.example.com/forum-f1-s1550.html
(the difference is the "s" again)

So I thought I am smart and found this line:
# FORUM WITHOUT ID & DELIM

in the .htaccess file and changed one line afterwards as follows:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-f
#ORIGINAL WAS:
#RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
#I REPLACED IT BY:
RewriteRule ^([a-z0-9_-]+)(-s?([0-9]+))\.html$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]

(I just put the "s?" (without quotes) in the same position as you did before for the topics)

But this didn't change anything, same things work and don't work for the forums. So I have no clue what could do the trick :oops:

Thank you very much for your help!!
Cheers
sopi ;)
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby dcz » Mon May 11, 2009 2:56 pm

Oh sorry, you need to add the s? in all forum rewriterules (there is two) :
Code: Select all
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-s?([0-9]+))\.html$ viewforum.php?f=$1&start=$3 [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
dcz
Admin
Admin
 
Posts: 21219
Joined: Fri Apr 28, 2006 9:03 pm

Re: Old rewriting pagination links

Postby sopi » Mon May 11, 2009 4:21 pm

*doh* :oops:

Thank you very very much.
I hope now I got all the strange relicts from bevor-the-update -_-;

*sends some flowers, luck, love and best wishes through the ether*
sopi ;)
sopi
 
Posts: 19
Joined: Wed Dec 03, 2008 9:52 pm

Re: Old rewriting pagination links

Postby dcz » Sun May 17, 2009 9:13 am

;)
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: 21219
Joined: Fri Apr 28, 2006 9:03 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests