Uninstall, can it be done?

phpBB SEO Premod for phpBB3 support forum.
This premodded version of phpBB3 includes the three different type of URL rewriting for phpBB3 by phpBB SEO. It comes with several other Search Engine Optimization mods installed.

Moderator: Moderators

Uninstall, can it be done?

Postby Stokerpiller » Fri Nov 14, 2008 7:25 pm

Hello

Is it possible to uninstall the SEO Mod without being punished by google?
Redirect -http://www.mydomain.com/mytopic-about-t586.html
to standard phpbb3 link?

I have a board that seems to be heavy modded and it is jut to much work updating.
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Advertisement

Postby SeO » Sat Nov 15, 2008 8:38 am

Updating with the premod does not involves any work to update the SEO mods themselves.
It's just as easy as if you where updating phpBB with no mods.

Anyway, the answer is yes, you can uninstall, but you need to prepare things a bit, because like when you install some url rewriting, you need to properly redirect old urls to the new ones.
Note that if you recently redirected many natural urls to the rewritten ones, then it would probably be better to keep them a bit more not to be redirecting massively every other day.

The easiest way to get rewritten urls redirected to the natural ones would be to link all the rewriterules to a dedicated php script where you would grabb the GET vars and http 301 redirect from there.

For forums, topics and post, with pagination, you'd need :
Code: Select all
<?php
/**
*
* redirect.php
*
*/
// Some config
$phpbb_url = 'http://www.example.com/phpBB/';
// nothing to change bellow
$phpbb_root_path = './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);

$forum_id = !empty($_GET['f']) ? max(0, intval($_GET['f'])) : 0;
$topic_id = !empty($_GET['t']) ? max(0, intval($_GET['t'])) : 0;
$post_id = !empty($_GET['p']) ? max(0, intval($_GET['p'])) : 0;
$start = !empty($_GET['start']) ? max(0, intval($_GET['start'])) : 0;
$_start = $start ? "&start=$start" : '';
$url = '';
if ($post_id) {
   $url = "viewtopic.$phpEx?p=$post_id";
} else if ($topic_id) {
   $_forum_bit = $forum_id ? "f=$forum_id&" : '';
   $url = "viewtopic.$phpEx?{$_forum_bit}t=$topic_id{$_start}";
} else if ($forum_id) {
   $url = "viewforum.$phpEx?f=$forum_id{$_start}";
}
// Will redirect to forum index in case no url was built
$url = $phpbb_url . $url;
header('HTTP/1.1 301 Moved Permanently', false, 301);
header('Location: ' . $url);
exit();
?>


in a file called redirect.php, then, you'd need to replace all the script names (viewtopic.php, viewforum.php etc) in the rewriterules with redirect.php (only the script fine name), and it should work ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Stokerpiller » Sat Nov 15, 2008 3:42 pm

Thanks for your reply.

Just want to make sure that I understand you correctly.
So i need to keep the .htaccess file as it is an do the changes you wrote + upload the redirect.php to root?
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby SeO » Sun Nov 16, 2008 9:01 am

This of course requires to be tested locally before going online, but yes it's the principle, post here your .htaccess if you need more help ;)
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Stokerpiller » Sun Nov 16, 2008 10:10 am

Well, its kind of complicated :D

I have moved one of my boards from a folder to a new domain.
Like this:
-http://www.mydomain.dk/phpbb2/forum.html
to:
-http://www.mynewdomain.dk/index.php
and this domain does not use SEO, but the old one does.

This means that I need to redirect this:
-http://www.mydomain.dk/phpbb2/server-skab-t3585.html
to this:
-http://www.mynewdomain.dk/viewtopic.php?f=28&t=3585

I have asked similar question before, but I am lost on the solution :oops:

Anyway, I hope You can help. Here goes my .htaccess from the old domain:
Code: Select all
# 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 /phpbb2/
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION
#########################################################
# GYM Sitemaps & RSS               #
#########################################################
# Global channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?/?$ /phpbb2/gymrss.php?channels&$2&$4&$6 [L,NC]
#########################################################
# END GYM Sitemaps & RSS            #
#########################################################

RewriteCond %{REMOTE_HOST} 66\.79\.166\.3 [OR]
        RewriteCond %{REMOTE_HOST} 85\.140\.220\.7 [OR]
        RewriteCond %{REMOTE_HOST} 85\.21\.125\.100 [OR]
        RewriteCond %{REMOTE_HOST} 60\.190\.240\.68 [OR]
        RewriteCond %{REMOTE_HOST} 91\.74\.160\.18 [OR]
        RewriteCond %{REMOTE_HOST} 67\.159\.44\.138 [OR]
        RewriteCond %{REMOTE_HOST} 195\.229\.242\.57
   RewriteRule .* http://www.kinagrill.dk/ [R=301,L]

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# 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_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^bekendtgorelser/[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_-]*-t([0-9]+)(-([0-9]+))?\.html$ viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^bruger/([^/]+)/?$ memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^beskeder/([^/]+)/?(side([0-9]+)\.html)?$ search.php?author=$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 ^indlaeg([0-9]+)\.html$ viewtopic.php?p=$1 [QSA,L,NC]
# THE TEAM
RewriteRule ^teamet\.html$ memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# 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
#####################################################
#########################################################
# GYM Sitemaps & RSS               #
#########################################################
# Main feeds & channels
RewriteRule ^rss(/(news)+)?(/(digest)+)?(/(short|long)+)?(/([a-z0-9_-]+))?/([a-z0-9_]+)\.xml(\.gz)?$ /phpbb2/gymrss.php?$9=$8&$2&$4&$6&gzip=$10 [L,NC]
# Forum feeds
RewriteRule ^[a-z0-9_-]*-f([0-9]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /phpbb2/gymrss.php?$8=$1&$3&$5&$7&gzip=$9 [L,NC]
# Module feeds without ids
RewriteRule ^([a-z0-9_-]+)(/(news)+)?(/(digest)+)?(/(short|long)+)?/([a-z0-9_]+)\.xml(\.gz)?$ /phpbb2/gymrss.php?nametoid=$1&$3&$5&$7&modulename=$8&gzip=$9 [L,NC]
# Google SitemapIndex
RewriteRule ^sitemapindex\.xml(\.gz)?$ /phpbb2/sitemap.php?gzip=$1 [L,NC]
# Forum sitemaps
RewriteRule ^[a-z0-9_-]+-f([0-9]+)\.xml(\.gz)?$ /phpbb2/sitemap.php?forum=$1&gzip=$2 [L,NC]
# Module sitemaps
RewriteRule ^([a-z0-9_]+)-([a-z0-9_-]+)\.xml(\.gz)?$ /phpbb2/sitemap.php?$1=$2&gzip=$3 [L,NC]
#########################################################
# END GYM Sitemaps & RSS            #
#########################################################
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby dcz » Thu Nov 27, 2008 11:05 am

to redirect -http://www.mydomain.dk/phpbb2/*.* to -http://www.mynewdomain.dk/ just use :

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mynewdomain\.com [NC]
RewriteRule ^(.*) http://www.mynewdomain.com/$1 [QSA,L,R=301]


in mydomain.dk root's .htaccess.

Then, in the new domain's .htaccess, do as suggested, replace all the script names (viewtopic.php, viewforum.php etc) in the rewriterules with redirect.php.

Should so it, but should be tested too ;)

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

Postby Stokerpiller » Thu Nov 27, 2008 11:56 am

Doesnt the above code miss info about the folder that should be redirected (phpbb2) ?
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby SeO » Thu Nov 27, 2008 7:59 pm

Oh yes, since in your case you want to get rid of the dir as well, so it would be :

Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mynewdomain\.com [NC]
RewriteRule ^phpbb2/?(.*) http://www.mynewdomain.com/$1 [QSA,L,R=301]


In the old domain's root's .htaccess (old.com/phpbb2/url.html => new.com/url.html).
To as well redirect the root urls, you could add :
Code: Select all
RewriteCond %{HTTP_HOST} !^www\.mynewdomain\.com [NC]
RewriteRule ^(.*) http://www.mynewdomain.com/$1 [QSA,L,R=301]


right after (old.com/url.html => new.com/url.html).
SeO
Admin
Admin
 
Posts: 6334
Joined: Wed Mar 15, 2006 9:41 pm

Postby Stokerpiller » Thu Nov 27, 2008 8:48 pm

Adding this to my old domains .htaccess does nothing at all:
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.mynewdomain\.com [NC]
RewriteRule ^phpbb2/?(.*) http://www.mynewdomain.com/$1 [QSA,L,R=301]


And yes, I did remember to replace mynewdomain with domain name :wink:
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby dcz » Fri Nov 28, 2008 9:26 am

Stokerpiller wrote:And yes, I did remember to replace mynewdomain with domain name :wink:


The new one in the old one's .htaccess right ?
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: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Postby Stokerpiller » Fri Nov 28, 2008 10:00 am

I have done changes on both domains.

First step is to get the folder phpbb2 redirected to new domain.
That part is not working.
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby dcz » Fri Nov 28, 2008 11:45 am

Well, we are only talking about the old domain's root .htaccess so far, and you did not answer my question ;)
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: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Postby Stokerpiller » Fri Nov 28, 2008 1:24 pm

I am not sure that I know what you mean?
Isnt this the answer: Uninstall, can it be done? ?
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Postby dcz » Fri Nov 28, 2008 2:11 pm

Yes, to be used in the old domain's root .htaccess with the new domain mentioned in it ;)
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: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Postby Stokerpiller » Fri Nov 28, 2008 2:18 pm

That is eactly what I have done.
Kind Regards
Stokerpiller
Stokerpiller
PR1
PR1
 
Posts: 125
Joined: Thu May 24, 2007 6:46 pm

Next

Return to phpBB SEO Premod

Who is online

Users browsing this forum: No registered users and 8 guests