Keep forum and topic url from phpbb2

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

Moderator: Moderators

Keep forum and topic url from phpbb2

Postby malder » Sun Feb 22, 2009 6:05 pm

To avoid loss of searches from google, my desire is to maintain the sequence of the addresses and message forums, which are the most important thing for me

Keep the old phpBB2: Forums url an topics url.
I have tried several changes to the new. Htaccess for phpbb3 but these have not been successful, which is why we ask for help in the support forum.

The phpbb2 .htaccess:
Code: Select all
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]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [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]

#my mod
RewriteRule ^forum([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^topic([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^topic([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^profile([0-9]*).html profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^search-author-([a-zA-Z0-9_-]*).html search.php?&search_author=$1 [L]
#This is in case username on your phpBB come like FirstName+LastName
RewriteRule ^search-author-([a-zA-Z0-9+-]*).html search.php?&search_author=$1 [L]



PHPBB3 htaccess.
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>

# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /phpbb3/
# 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 WOULD STAND HERE IF USED. "forum" REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum\.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 ^announces/[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 SIMPLE
RewriteRule ^member([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^member([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^group([0-9]+)(-([0-9]+))?\.html$ memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.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
RewriteRule ^([a-z0-9_-]+)(-([0-9]+))\.html$ viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z0-9_-]+)\.html$ viewforum.php?forum_uri=$1 [QSA,L,NC]
# END PHPBB PAGES




in phpbb3. htaccess I tried to change the line:
Code: Select all
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(-([0-9]+))?\.html$ viewforum.php?f=$1&start=$3 [QSA,L,NC]


REPLACE WITH

Code: Select all
RewriteRule ^forum([0-9]*).html$ viewforum.php?f=$1&start=$3 [QSA,L,NC]


Has not worked
malder
 
Posts: 9
Joined: Sat Sep 08, 2007 6:17 pm

Advertisement

Re: Keep ulf forum and topic from phpbb2

Postby SeO » Mon Feb 23, 2009 5:07 pm

There is no real need to keep the same urls as before, we actually changed all url for both forums here just today, since phpBB SEO website update. And it's already the second time in phpBB SEO's life, without any loss in SERP and referrals.

It is doable, but not necessarily a good thing, converting to phpBB3 will change some urls since you most likely had many duplicates with the good old able2know mod (if I'm not wrong). And the new possibilities are pretty interesting, but the most important, is that massive redirect from the old url to the new one is really made simple with the zero duplicate.
So, I would suggest you to give a local try to our phpBB SEO Premod V 3.0.4 to find out more about the possibilities and eventually wonder if better urls would not be better in your case.

You'll still be able to keep you current urls once done, but it's not time loss to take some tim to think about it.

If you still want to keep your current urls, you will have to use the simple SEO URL mod (included in the premod) and tweak the phpbb_seo_class.php file as explained in the install.
It's a matter of editing the static part (like changing "post" to "post-" and "topic" to "about"). You should be able to at least keep your current urls for forums, post and topics, but you'll most likely won't be able to keep your current &highlight urls, things like that.
You'd need to redirect these just like if you had changed all your url, eg, keep the required phpBB2 rewriterules up and running at the end of your phpBB3 .htaccess.

In all case, I encourage you to spend some time on local testing, and to report here when you'll be ready. I'll help you with the rewriterules to keep ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm


Return to Advanced SEO URL

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Bing [Bot] and 9 guests