| :: |
| Author |
Message |
alexzive
Joined: 21 Jan 2007 Posts: 7
|
Posted: Sun Jan 21, 2007 6:20 pm Post subject: renaming "/phpBB2/" into "myforum" |
|
|
hello again:)
Q: is it better to rename the folder "phpBB2" into "myforum" to get a better indicization for the search engines like google?
thanks, Alex |
|
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sun Jan 21, 2007 6:47 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
Yes, using phpBB/ as install folder name is not the best thing to do.
You'd better use this folder name to add a better keyword.
forum/ is not always good, lots of time it is possible to find a word, handy and useful for both users and SEO.
Then, this is for when you first install your forum.
If your forum was first installed online in a folder named phpBB/, you can change it, but you'll have to HTTP 301 redirect all links. As this mean all your forums url are going to change.
It's not hard to do, it's just something you'd better be sure about before implementing it. You do not want to change URL every other day.
To do it, you'd just need to add this rewriterule before the forum ones :
| Code: |
rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301] |
And update phpBB config with the new folder name, as well as, obviously rename the actual install folder used for phpBB
++ |
_________________ 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 |
|
 |
alexzive
Joined: 21 Jan 2007 Posts: 7
|
Posted: Sun Jan 21, 2007 7:12 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
thank you very much.
1) | Code: | rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301]
|
do you mean to just add this line in the ".htaccess" just before
| Code: |
# FORUM PROTECTION RULE
RewriteRule ^phpBB2/.+/([^/]+\.html)$ /phpBB2/index.php [R=301,L] |
???
2) I found in my local support for phpbb2 that I should also upgrade the db like this:
| Code: | UPDATE phpbb_config SET config_value = 'www.mydomain.com' WHERE config_name = 'cookie_domain';
UPDATE phpbb_config SET config_value = '/myforum/' WHERE config_name = 'cookie_path';
UPDATE phpbb_config SET config_value = 'www.mydomain.com' WHERE config_name = 'server_name';
UPDATE phpbb_config SET config_value = '/myforum/' WHERE config_name = 'script_path'; |
should I? |
Last edited by alexzive on Sun Jan 21, 2007 7:13 pm; edited 1 time in total |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
alexzive
Joined: 21 Jan 2007 Posts: 7
|
Posted: Sun Jan 21, 2007 7:19 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
many thanks,
a last question:
my forum is named "progressforum" and is about science and technology.
Do you mean renaming ["phpBB2"-->"science"] could positively affect a google search like:
"science" + "topic keyword"
?? |
Last edited by alexzive on Sun Jan 21, 2007 7:21 pm; edited 1 time in total |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
alexzive
Joined: 21 Jan 2007 Posts: 7
|
Posted: Sun Jan 21, 2007 7:23 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
great!
thks again! |
|
|
| Back to top |
|
 |
hvactechforum
Joined: 03 Mar 2007 Posts: 44
|
Posted: Sat Mar 03, 2007 6:28 am Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
I would really like more information on this subject if possible. There are a couple of things that I do not understand. Let me explain...
Here is the example database modification that you show (below). Are these queries that I would run in phpmyadmin? Also, I don't know how to fill in the fields.
| Code: | UPDATE phpbb_config SET config_value = 'www.mydomain.com' WHERE config_name = 'cookie_domain';
UPDATE phpbb_config SET config_value = '/myforum/' WHERE config_name = 'cookie_path';
UPDATE phpbb_config SET config_value = 'www.mydomain.com' WHERE config_name = 'server_name';
UPDATE phpbb_config SET config_value = '/myforum/' WHERE config_name = 'script_path'; |
1. Would I add "http://www.myrealdomain.com" or would I add "www.myrealdomain.com"?
2. What do I put in for cookie_domain?
3. What do I put in for cookie_path?
4. What do I put in for server_name?
5. What do I put in for script_path?
I guess maybe an example would be really, really helpful.
BTW, thanks for all of your hard work. It takes a lot of dedication to create a work like this.  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sat Mar 03, 2007 2:19 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
| dcz wrote: | ...for the db editing, you can just go to acp and do it from there, just update script path
++ |
You can changes these settings in phpbb's acp. it's easier
| Code: | | acp => configuration. |
Then about the proper settings, when renaming phpBB's folder, you should only update the script_path to match the new folder name.
I take this as a occasion to recall the cookie_domain most flexible setting is : .example.com (with the dot "." and you real domain ).
You can set it up to many more values, but this one will allow sessions sharing across sub domains (from the same main domain where phpBB is installed) and even though it's not always needed, it can save time to always use this setting in all case.
Server name should be set to www.example.com in case you're using the www prefix or example.com when you do not.
++ |
_________________ 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 |
|
 |
hvactechforum
Joined: 03 Mar 2007 Posts: 44
|
Posted: Sat Mar 03, 2007 6:09 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
Thanks dcz  |
|
|
| Back to top |
|
 |
euroman PR0

Joined: 21 Oct 2006 Posts: 81
|
Posted: Sun Mar 04, 2007 1:47 am Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
| dcz wrote: | Yes, using phpBB/ as install folder name is not the best thing to do.
You'd better use this folder name to add a better keyword.
forum/ is not always good, lots of time it is possible to find a word, handy and useful for both users and SEO.
Then, this is for when you first install your forum.
If your forum was first installed online in a folder named phpBB/, you can change it, but you'll have to HTTP 301 redirect all links. As this mean all your forums url are going to change.
It's not hard to do, it's just something you'd better be sure about before implementing it. You do not want to change URL every other day.
To do it, you'd just need to add this rewriterule before the forum ones :
| Code: |
rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301] |
And update phpBB config with the new folder name, as well as, obviously rename the actual install folder used for phpBB
++ |
rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301]
I am moving from root to new_folder
so I should add: rewriteRule ^/(.*)$ /new_folder/$1 [QSA, L, R=301]
? Well, it dosent work.
Whereas config.php - I cant see there are any folder information in there ?
| Quote: |
<?php
// phpBB 2.x auto-generated config file
// Do not change anything in this file!
$dbms = 'mysql4';
$dbhost = 'localhost';
$dbname = 'xxxx';
$dbuser = 'xxx';
$dbpasswd = 'xxxx';
$table_prefix = 'xxxxx';
define('PHPBB_INSTALLED', true);
?> |
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sun Mar 04, 2007 5:46 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
Well, moving from root to a sub folder is not the same as moving from a folder to another one.
Here we cannot redirect everything, as it would not allow the use of the root level for other pages.
If, as suggested, you implemented the phpBB SEO rewriterules in your root's .htaccess, you can add the following rewriterule at the end of it (here order is important) :
| Code: | | RewriteRule ^(.*)(-c|-f|-t)([0-9]+)\.html$ http://www.example.com/phpbb/$1$2$3.html [QSA,L,R=301] |
Where you need to replace -http://www.example.com/phpbb/ with your real phpBB url.
As well, note that I used the 0.2.x delimiters, you'd need to use (-vc|-vf|-vt) instead of (-c|-f|-t) in case you're using the previous ones.
This rewriterule will redirect categories, forums and topic urls.
++ |
_________________ 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 |
|
 |
euroman PR0

Joined: 21 Oct 2006 Posts: 81
|
Posted: Mon Mar 05, 2007 1:45 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
Strange - I cant make it work:
I put the new .htacess at the real root - not the new phpbb folder.
I put the extra rewrite rule at the bottom of the new .htaccess - also I have chenged it to http://mydomain.com/newfolder/ |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
euroman PR0

Joined: 21 Oct 2006 Posts: 81
|
Posted: Mon Mar 05, 2007 2:22 pm Post subject: Re: renaming "/phpBB2/" into "myforum" |
|
|
ok
| Quote: | RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# CATEGORIES
RewriteRule ^cat([0-9]+)\.html$ /index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^forum([0-9]+)-([0-9]+)\.html$ /viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^forum([0-9]+)\.html$ /viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^topic([0-9]+)-([0-9]+)\.html$ /viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^topic([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
#####################################################
########################################################
# phpBB
RewriteRule ^sitemaps.xml$ /sitemap.php [L]
RewriteRule ^forum-sitemap-([0-9]+).xml$ /sitemap.php?fid=$1 [L]
RewriteRule ^sitemap-forum.xml$ /sitemap.php?forum [L]
# mxBB
RewriteRule ^mx-sitemap.xml$ /sitemap.php?mx [L]
# KB
RewriteRule ^kb-sitemap-([0-9]+).xml$ /sitemap.php?kbid=$1 [L]
RewriteRule ^sitemap-kbcat.xml$ /sitemap.php?kbcat [L]
#########################################################
# END GG_SITEMAPS REWRITE RULES #
#########################################################
RewriteRule ^(.*)(-c|-f|-t)([0-9]+)\.html$ http://www.mydomain.dk/phpbb/$1$2$3.html [QSA,L,R=301]
|
|
Last edited by euroman on Sun Aug 19, 2007 3:14 pm; edited 1 time in total |
|
| Back to top |
|
 |
|
|