| |
|
| :: |
| Author |
Message |
AMH
Joined: 11 Oct 2006 Posts: 30
|
Posted: Sat Apr 05, 2008 4:37 pm Post subject: Changed URL's with PHPBB3? |
|
|
I have used Version PHPBB2 for many years with PHPBB SEO. Then when I upgraded I now converted the database and gt it up and running. Problem is that all the URL's in Google are now wrong:
In Google:
files-vf9.html (and also) -vt24.html
In Website
files-f9.html (and also) -t24.html
How do I fix this in the HTACCESS?
# 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 line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /forum/
# 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_-]*-vt([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_-]*-vt([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES ADVANCED
RewriteRule ^[a-z0-9_-]*-u([0-9]+)\.html$ memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES ADVANCED
RewriteRule ^[a-z0-9_-]*-m([0-9]+)(-([0-9]+))?\.html$ search.php?author_id=$1&sr=posts&start=$3 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([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]
# THE TEAM
RewriteRule ^the-team\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES
RewriteRule ^sitemap.xml$ sitemap.php [L]
RewriteRule ^forum-([0-9]+).xml$ sitemap.php?fid=$1 [L]
# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^[a-z0-9_-]+(-([0-9]+))?\.html$ viewforum.php?start=$2 [QSA,L,NC]
# END PHPBB PAGES
##################################################### |
|
|
| Back to top |
|
 |
|
 |
doudou phpBB SEO Team

Joined: 17 Sep 2006 Posts: 335 Location: Dans son Coeur...
|
Posted: Sat Apr 05, 2008 9:59 pm Post subject: Re: Changed URL's with PHPBB3? |
|
|
Hi, my english is very bad but open file phpbb_seo/phpbb_seo_class.php
Find and replace
| Code: | // can be edited, requires .htaccess update.
$this->seo_delim = array( 'forum' => '-f', 'topic' => '-t', 'user' => '-u', 'usermsg' => '-m', 'group' => '-g', 'start' => '-');
|
with this:
| Code: | // can be edited, requires .htaccess update.
$this->seo_delim = array( 'forum' => '-vf', 'topic' => '-vt', 'user' => '-u', 'usermsg' => '-m', 'group' => '-g', 'start' => '-');
|
You must do a copie of this file before any modifications. |
_________________ Forum phpBB3 | mod Rewrite phpBB3 | mod Rewrite phpBB3 |
|
| Back to top |
|
 |
AMH
Joined: 11 Oct 2006 Posts: 30
|
Posted: Sun Apr 06, 2008 7:26 am Post subject: Re: Changed URL's with PHPBB3? |
|
|
Thankyou!
-vt ----> OK!
-vf ----> No
Any ideas as I cleared the cache! |
|
|
| Back to top |
|
 |
janmyszkier
Joined: 12 Oct 2007 Posts: 43 Location: Wroclaw, Poland.
|
Posted: Sun Apr 06, 2008 10:02 am Post subject: Re: Changed URL's with PHPBB3? |
|
|
| well as far as I understand vf come from ViewForum and vt comes from ViewTopic, so why one is better than other in your opinion? |
|
|
| Back to top |
|
 |
doudou phpBB SEO Team

Joined: 17 Sep 2006 Posts: 335 Location: Dans son Coeur...
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3987
|
Posted: Tue Apr 08, 2008 9:39 am Post subject: Re: Changed URL's with PHPBB3? |
|
|
Simpler solution, keep everything as it was at first, eg keep using the -t and -f, and to catch the -vf and -vt's, just replace all occurrences of -f and -t with -v?f and -v?t in your .htaccess.
The zero duplicate will do the rest and you'll be able to keep the virtual folder trick on  |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|