Migrating from seo_urls_v2

Discussions and support about the different URL Rewriting techniques for phpBB2.

Moderator: Moderators

Migrating from seo_urls_v2

Postby the0ne » Sat Oct 28, 2006 6:52 am

I have seo_urls_v2 and now i am thinking of migrating to SEO Mixed mod Rewrite

what are the steps i have to do

    # Uninstall mod-seo_urls_v2
    # Update mx_ggsitemaps_v1.0.0RC2 to 1.0.1
    # Add phpBB SEO Mixed mod Rewrite
    # should i do any thing about Zero duplicate
the0ne
 
Posts: 14
Joined: Wed Oct 25, 2006 9:40 am

Advertisement

Postby dcz » Sun Oct 29, 2006 3:26 pm

So here is what we need to do.

First, the .htaccess :

We need to add, the phpBB SEO mixed mod rewrite rewriterules in it (I take the .htaccess you posted here to build this one) :
Code: Select all
DirectoryIndex index.html index.htm portal.php index.php
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

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

# Here we will add other rewriterules later if needed (mx Google sitemaps etc)

# SEO URL V2 Rewriterules
RewriteRule ^[a-z0-9-]+-([pt])([0-9]+)\.html$ /viewtopic.php?$1=$2 [L]
RewriteRule ^[a-z0-9-]+-f([0-9]+)\.html$ /viewforum.php?f=$1 [L]
RewriteRule ^[a-z0-9-]+-u([0-9]+)\.html$ /profile.php?mode=viewprofile&u=$1 [L]
RewriteRule ^([a-zA-Z0-9_]+),([^/,]+),([^/,]*)([^/]*\.html)$ $1$4?$2=$3 [QSA,N]
RewriteRule ^[a-z0-9-]+-([pt])([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ viewtopic$5?$1=$2&$3=$4 [QSA,N]
RewriteRule ^[a-z0-9-]+-f([0-9]+),([^/,]+),([^/,]*)([^/]*\.html)$ viewforum$4?f=$1&$2=$3 [QSA,N]
RewriteRule ^([a-zA-Z0-9_]+)\.html$ /$1.php [L]


You'll may have to get rid of this line (depending on your servers settings) :
Code: Select all
Options +FollowSymlinks


I kept your DirectoryIndex personal settings to make it easier.

We need to keep the SEO URL V2 rewriterules because we want to let the Zero duplicate working. And we need php to find out titles so the process goes like this :

old-url.html ==> .htaccess ==> script.php?vars... ==> http 301 redirection (zero dupe) ==> new-url.html ==> script.php?vars... ==> page load.

It's no big deal performance wise because we keep them at the end of the .htaccess, so they only get hit when all previous rewriterules did not match. The L flag tell the mod rewrite engine to stop on the first matching rule so the following won't be tested.

The best then, to ensure a good and prompt transition would be to perform some test on a test server. The procedure would be to uninstall SEO URL V2 and to install the phpBB SEO mixed mod rewrite.

Then, some part of the mod, like the add on to get rid of double content is not really necessary to keep (would need small adaptation as his), because the zero dupe will do it's job for this part.
I'll soon update the phpBB SEO mod rewrite to add a full zero duplicate output and it's no problem at all if you wait until this with the zero dupe.

Once the tests forum would be up and running, I'd PM you the zero dupe and we'd be ready to migrate and proceed further with mx Google sitemaps and so on.

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

Postby the0ne » Mon Oct 30, 2006 3:11 am

I am moving to a new hosting in 1-2 weeks from now and i have my exams coming up by next week, so i will start with the migrating of the mod after that

thanks for ur prompt reply and the effort to explain the things in detail, it really means a lot to me

thanks once again. :D
the0ne
 
Posts: 14
Joined: Wed Oct 25, 2006 9:40 am

Postby dcz » Mon Oct 30, 2006 4:43 pm

You're welcome ;)
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: 21411
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB2 mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 6 guests