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
Moderator: Moderators
rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301]
rewriteRule ^old_folder/(.*)$ /new_folder/$1 [QSA, L, R=301]
# FORUM PROTECTION RULE
RewriteRule ^phpBB2/.+/([^/]+\.html)$ /phpBB2/index.php [R=301,L] 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';

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';dcz wrote:...for the db editing, you can just go to acp and do it from there, just update script path
++
acp => configuration.
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: Select all
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
++
<?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);
?>

RewriteRule ^(.*)(-c|-f|-t)([0-9]+)\.html$ http://www.example.com/phpbb/$1$2$3.html [QSA,L,R=301]


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]

Users browsing this forum: No registered users and 2 guests