| :: |
| Author |
Message |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Wed Nov 01, 2006 9:59 pm Post subject: Migrating from webmedic to Advanced re-write |
|
|
First off, thanks for making a wicked mod. It's great.
I've been using your version of the webmedic mod, and want to switch it up to the Advanced rewrite.
I've already stripped out the old webmedic code, added the new advanced rewrite code, and I'm basically ready to upload...a few concerns first.
Will the new advanced rewrite output different URLs? I have thousands of pages already indexed and don't want to lose them.
If it does output different url's, is there a relatively easy way to 301 to the new urls?
Also, I use phpbbfetchall to pull thread titles and display them in the non-phpbb sections of my site. Right now it's acheived by using the function:
| Code: | | <?php echo append_sid(make_url_friendly($recent[$i]['topic_title']) . '-vt' . $recent[$i]['topic_id']); ?> |
I know the make_url_friendly functoin is in the old mod - Is there an equivalent in the advanced seo rewrite?
Thanks so much - I'm eager to do this, I've even done your optimize keywords thing (and went through 1000 of the top words on the site and removed a tonne). |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Thu Nov 02, 2006 3:27 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
| So just to be 100% sure - I won't need any 301's? The url's will stay the same, with the exception of double-hyphen ones? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Sun Nov 05, 2006 1:02 am Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
So I've pretty much got this all working but I'm running into this problem.
After posting a new topic, deleting an old one, etc (posting.php) the link that looks like:
| Code: |
Your message has been deleted successfully.
Click Here to return to the forum |
Has a link like: viewforum.php?f=9
Instead of the correct re-write link, and when you click on the link, it then times out (maybe stuck in some loop).
Any ideas? Otherwise it seems to all be working well.. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Sun Nov 05, 2006 4:39 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
Could this code be a problem:
| Code: | | $seo_forum_name = FALSE; | ?
I also notice it does the same thing on the last topic displayed on the main forum index (giving the incorrect re-written link).
Is it possible I missed something with the old keywords-url 2.3.1 mod?
Or this code in posting.php
| Code: | else
{
redirect(append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id", true));
} | could be the problem?
Here is my .htaccess:
| Code: | #########################################################
# forums SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.forums-seo.com
# STARTED : 01/200
#####################################################
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^forums/.+/([^/]+\.html)$ /forums/index.php [R=301,L]
# CATEGORIES
RewriteRule ^forums/.+-vc([0-9]+)\.html$ /forums/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^forums/.+-vf([0-9]+)-([0-9]+)\.html$ /forums/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^forums/.+-vf([0-9]+)\.html$ /forums/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^forums/.+-vt([0-9]+)-([0-9]+)\.html$ /forums/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^forums/.+-vt([0-9]+)\.html$ /forums/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^forums/post([0-9]+)\.html$ /forums/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^forums/member([0-9]+)\.html$ /forums/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END forums PAGES |
phpbb is in the subfolder 'forums' and the htaccess is in the / root of the site. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
Posted: Mon Nov 06, 2006 10:58 am Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
| Code: | | $seo_forum_name = FALSE; |
Is meant to initialize the URL rewriting process, so yes, as every piece of code suggested in the mod, it is required.
The last post link is left statically rewritten for now because all post URLs are duplicate and we don't want to keep them.
The good old webmedic's code was injecting titles in some of the post URLs (remember the image-vpxx.html links on index ?) which was making it impossible to properly disallow them in our robots.txt file.
The zero duplicate is taking car of them now, so it's no worry at all to keep them, and your robots.txt could have do this anyway (which was impossible with the webmedic's code).
Next update will allow to totally get rid of post URLs in output, as on this site.
The phpBB SEO mod rewrites are doing exactly what's shown on www.phpbb-seo.net (don't forget you can do some choices).
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Mon Nov 06, 2006 5:21 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
One thing I forgot to mention about the topic on index. I'm using the Last Topic Title on Index mod (you can find it on phpbb.com).
I managed to fix the code to work with the advanced mod re-write. It isn't pretty, but it works.
If you're using the Last Topic Title on Index mod then do the following.
| Code: | in index.php find:
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
Replace with:
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid(format_url($lttitle) . '-vt' . $ltid . '.html') . '">' . $lttitle . '</a><br />'; |
And that'll give you the title of the last posted topic on your index page, re-written using the phpbbseo code.
I'm going to try the same thing on my post re-direct page to see if I can get that working properly too. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Mon Nov 06, 2006 5:35 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
Here's a link to download the last topic on index mod:
http://www.phpbb.com/phpBB/viewtopic.php?t=350442
Thanks for having a look Like I said, it seems to be working, but you're right, it should go through the filter system.
I found this in many places in my posting.php, which creates the re-direct links:
| Code: | | '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '"> |
I'm thinking I need to do the same thing (format_url) but again should pass things through the filter. How do I get that working?  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
Posted: Mon Nov 06, 2006 5:52 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
Well, for posting.php, you'll need more than the same trick, as you'll need to grab the topic title.
I'll do this for next update, till then, you should not loose time on this, as no bot will ever see such links (even AdSense as they get redirected before Google can know it).
For the topic on index mod :
Open :
Find :
| Code: | if (!$auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
{
$lttitle = '';
$lang_in = '';
}
// append first 25 characters of topic title to last topic data
$lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />'; |
Replace with :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($auth_read_ary[$forum_data[$j]['forum_id']]['auth_read'])
{
$seo_topic_name = $lttitle;
// append first 25 characters of topic title to last topic data
$lttitle = (strlen($lttitle) > 25) ? substr($lttitle,0,25) . '...' : $lttitle;
$last_post .= $lang_in . ' ' . '<a title="' . $altlttitle . '" alt="' . $altlttitle . '" href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$ltid") . '">' . $lttitle . '</a><br />';
}
// www.phpBB-SEO.com SEO TOOLKIT END |
And it should be ok
I did so the last topic link will not be shown if the user does not have the right to browse the forum.
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
mreider phpBB SEO Team

Joined: 07 May 2006 Posts: 219
|
Posted: Mon Nov 06, 2006 7:08 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
Fantastic, that works well.
One thought for the phpbbseo site - Maybe you should start a sub-forum with other mods that have been patched to work with your re-write - That'd help a lot of people too!
About the posting.php - The problem right now isn't so much dupe URLs as it is the re-direction. When you click on "Click here to view your message" it hangs and times out when trying to go to the viewforum or viewtopic link. I'm not sure why (which is why I wanted to do the re-writing). |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14327
|
|
| Back to top |
|
 |
arch stanton PR1

Joined: 04 Oct 2006 Posts: 116
|
Posted: Mon Nov 27, 2006 7:02 pm Post subject: Re: Migrating from webmedic to Advanced re-write |
|
|
| *edited* |
Last edited by arch stanton on Mon Nov 27, 2006 10:26 pm; edited 1 time in total |
|
| Back to top |
|
 |
|
|