Converting From phpBB 2 with AMR to phpBB 3 with AMR

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

Moderator: Moderators

Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby iFroggy » Sun Jun 08, 2008 1:18 am

Hey all,

I run several phpBB 2s and I use the advanced mod rewrite on all of them. :)

We are working toward an upgrade to phpBB 3 and aim to use the advanced mod rewrite for phpBB 3. But, I am also concerned about our current URLs and ensuring that they, at least, get forwarded.

As both hacks are released here, I was thinking there might be a concrete conversion in place that will ensure that the phpBB 2 urls created by the phpBB 2 hack will be forwarded to the new phpBB 3 ones. I did a quick search and looked at the package briefly, but I didn't see anything. So, I wanted to ask if anything like that was available. I may have missed it and, if that was the case, I would greatly appreciate a pointer to the right page. :)

I appreciate your time and consideration.

Thanks,

Patrick
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm

Advertisement

Postby Professional » Sun Jun 08, 2008 5:27 am

hi.
if u set the URL s like now ,it will be exatcly like your bb2 with mod rewrite.
u can also use preemode that already installed advanced , mixed and simple rewrite mod + zero duplicat.
http://downloads.phpbb-seo.com/seo-url- ... od-48.html
great !
User avatar
Professional
PR5
PR5
 
Posts: 544
Joined: Mon Apr 07, 2008 5:41 am
Location: 1/2 of the World

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby dcz » Mon Jun 09, 2008 9:35 am

iFroggy wrote:As both hacks are released here, I was thinking there might be a concrete conversion in place that will ensure that the phpBB 2 urls created by the phpBB 2 hack will be forwarded to the new phpBB 3 ones. I did a quick search and looked at the package briefly, but I didn't see anything. So, I wanted to ask if anything like that was available. I may have missed it and, if that was the case, I would greatly appreciate a pointer to the right page. :)


It's actually made simple by our mods, but since we are allowing so many configuration to our phpBB3 URLs, there is no final answer to it, it must be done on a per case basis.

The principle is simple though, all we will need is to keep some of the old rewriterules, the one that are different from the new phpBB3 one in the phpBB3 .htaccess, after :
Code: Select all
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES


This, in order to allow the old URL to still match phpBB script :

Code: Select all
old-url => old rewriterule => phpBB script (internal) => zero dupe => HTTP 301 redirect => new url => phpBB script (internal) and page load


As you see, the redirecting occurs with only one http 301 header and finally one page load.

So, to make it simple, and if you need some more help, please post here both your old and new .htaccess (the one you'll generate once you'll have chosen your settings) and I'll tell you what to keep ;)

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

Postby iFroggy » Mon Jun 09, 2008 1:07 pm

Hello,

Thank you very much for the replies. :)

I appreciate the offer of assistance, dcz. Right now, I'm using the default URLs for the phpBB 2 hack and I'm guessing I'll use the default URLs for the phpBB 3 one, as well. (Either URL structure is fine, so I guess I could just keep the old structure if that's feasible).

Anyway, I'll post back when it comes time to go over the .htaccess files. :) Thanks again!

Patrick
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm

Postby dcz » Mon Jun 09, 2008 1:14 pm

The conversion could as well be a good occasion to put together a nicer and unique URL standard, but you can as well stay close to phpBB2 urls if you prefer.

Maybe you should give a try installing our SEO premod, you'll be able to test all our mods at once without effort, some new features such as forum url caching and forum id removing are pretty nice ;)

You'd now better what to do with some tests.

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

Postby iFroggy » Mon Jun 09, 2008 1:25 pm

Thanks. :)
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby iFroggy » Tue Apr 28, 2009 3:39 am

Hello again,

Back from the dead. :) So, I'm digging into phpBB 3 and am planning to make the adjustments I need, including installing AMR. I have been searching the forums and reading various posts, but I didn't see a definitive guide (sorry if I missed it) to converting from phpBB 2 AMR to phpBB 3 AMR.

I'm cool with the URLs changing for the new version and don't need to keep the same URLs, but just want to ensure I redirect the old ones in the proper way. This is what I have for my .htaccess file:

Code: Select all
RewriteEngine On

RewriteCond %{QUERY_STRING} ^(.*)highlight=\%2527 [OR]

RewriteCond %{HTTP_COOKIE}% s:(.*):\%22test1\%22\%3b

RewriteRule ^.*$   -   [F,L]

Options +FollowSymlinks
RewriteBase /

#########################################################
# PHPBB SEO REWRITE RULES            #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^.+/([^/]+\.html)$ /index.php [R=301,L]
# CATEGORIES
RewriteRule ^.+-vc([0-9]+)\.html$ /index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^.+-vf([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^.+-vf([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^.+-vt([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^.+-vt([0-9]+)\.html$ /viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^member([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
#####################################################

#########################################################
# GYM SITEMAPS AND RSS REWRITE RULES         #
#########################################################
# AUTHOR : dcz http://www.phpbb-seo.com/
# STARTED : 2006/02/22
########################
# RSS main
RewriteRule ^rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1&$2 [L]
# RSS forums
RewriteRule ^forums-rss-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum&c&$1&$2 [L]
# RSS all
RewriteRule ^([a-zA-Z0-9_-]+)-rss([0-9]*)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?$1=$2&$3&$4 [L]
# RSS forum topics
RewriteRule ^.+-rf([0-9]+)-?(l|s)?-?(m)?\.(xml(\.gz)?)$ /rss.php?forum=$1&$2&$3 [L]
# SitemapIndex
RewriteRule ^sitemaps\.(xml(\.gz)?)$ /sitemap.php [L]
# Sitemap modules
RewriteRule ^([a-zA-Z0-9_-]+)-sitemap\.(xml(\.gz)?)$ /sitemap.php?$1 [L]
# Forum Sitemaps
RewriteRule ^.+-gf([0-9]+)\.(xml(\.gz)?)$ /sitemap.php?forum=$1 [L]
# Yahoo! urllist.txt
RewriteRule ^urllist\.(txt(\.gz)?)$ /urllist.php [L]
#########################################################
# END GYM SITEMAPS AND RSS REWRITE RULES      #
#########################################################

How should I handle this with the phpBB 3 AMR to ensure I do it correctly?

I appreciate your time and any assistance. Thanks again!

Patrick
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby dcz » Fri May 01, 2009 12:58 pm

Assuming that phpBB will stay in the same location when converted (eg in the same domain and script path), then you'll just have to keep these rewriterules (whatever the url standard you will chose in the end) :
Code: Select all
# PHPBB2 REDIRECT
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-vc[0-9]+\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-vf([0-9]+)(-([0-9]+))?\.html$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC
RewriteRule ^[a-z0-9_-]*-vt([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES
RewriteRule ^profile.php$ /memberlist.php [QSA,L,NC]
# END PHPBB2 REDIRECT


In your phpBB3 .htaccess, either after :
Code: Select all
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

if you do not use virtual folders, or just at the very end of it in case you do.

In case you would take this occasion to change your user profile urls, you would need to add this one too :
Code: Select all
# PHPBB2 PROFILES
RewriteRule ^member([0-9]+)\.html$ /memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]


For rss feeds, you would just need to activate the GYM1.x redirect option before you generate your phpBB3 .htaccess to get the proper rewriterules added automatically.

If you would like to redirect phpBB2 categories to the exact forum they got converted into (the above would redirect all of them to the forum index), you would need to use :
Code: Select all
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-vc([0-9]+)\.html$ /cat_redir.php?c=$1 [QSA,L,NC]

Instead of :
Code: Select all
# CATEGORIES
RewriteRule ^[a-z0-9_-]*-vc[0-9]+\.html$ /index.php [QSA,L,NC]

And then create a cat_redir.php file with this in it :
Code: Select all
<?php
/**
*
* @package phpBB SEO Toolkit
* @version $Id: rss.php,v 1.0 2006/12/09 13:48:48 dcz Exp $
* @copyright (c) 2006 dcz - www.phpbb-seo.com
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// Grabb necessary vars
// cat (forums) rss map
$cat = isset($_GET['c']) ? max(0, (int) $_GET['c']) : 0;
$cattoforum = array(2 => 64, 3 => 65, 6 => 66, 4 => 67, 5 => 68 );
if (isset($cattoforum[$cat])) {
   // Workarround for the zero dupe
   $_SERVER['PHP_SELF'] = 'viewforum.'.$phpEx;
   $_REQUEST['f'] = (int) $cattoforum[$cat];
   include($phpbb_root_path . 'viewforum.'.$phpEx);
} else {
   // Workarround for the zero dupe
   $_SERVER['PHP_SELF'] = 'index.'.$phpEx;
   include($phpbb_root_path . 'index.'.$phpEx);
}
exit;
?>

You would just need to properly set up the old_phpbb2_cat_id to new_phpbb3_forum_id array :
Code: Select all
$cattoforum = array(2 => 64, 3 => 65, 6 => 66, 4 => 67, 5 => 68 );

in that file.
These are the phpBB SEO values in use : phpBB SEO Portal

;)

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

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby iFroggy » Fri May 01, 2009 1:44 pm

Excellent. Thanks so much, dcz. :) I really appreciate your time and I'll let you know how it goes!

Patrick
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby dcz » Mon May 11, 2009 12:38 pm

You're welcome ;)

By the way, my example was altered by another little tweak I'm working on which transform the old urls into new ones in the post content and while posting.
I did mean to post this uri :
Code: Select all
boards/whatever-the-title-I-do-not-recall-vc2.html

for you to test, not the resulting phpBB SEO Portal direct link ;

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

Re: Converting From phpBB 2 with AMR to phpBB 3 with AMR

Postby iFroggy » Mon May 11, 2009 1:10 pm

Ah, I see. :) Thanks!

Patrick
iFroggy
 
Posts: 6
Joined: Sat Feb 17, 2007 2:33 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 5 guests