How to 301 redirect phpBB deleted topics to the homepage?

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

How to 301 redirect phpBB deleted topics to the homepage?

Postby jolin » Tue Jun 27, 2006 11:07 pm

Hey,

I had done an error when importing topics from my old board and I have to massively delete around 1400 pages that have already bein indexed by Google and I need to import them again. :cry: :cry: :cry:

The problem is that they will get different vt- numbers and be different pages.

(I use the url title rewrite mod)

Now what happens is that Google doesn't simply get a 404 on phpBB but get a page saying:

"The topic or post you requested does not exist"

Now Google would continue indexing this page as it seem to be legit with a valid URL with the deleted topic title as the link URL but will create like 1400 dups.

Is there an option to 301 (permanent) redirect these deleted topics pages to the homepage?
jolin
 
Posts: 17
Joined: Thu May 04, 2006 2:27 pm

Advertisement

Postby dcz » Tue Jun 27, 2006 11:16 pm

Well it depends.

First, if you deleted those topic and re imported others in the same board then, the new one should have a new ID, and the older Id should not be used any more.

If this is the case, then, something is possible ;)

We just need to know what where the deleted IDs, or will redirect every deleted topic at once which would cover all cases, even better.

Actually since this is an interesting question I'll think about something tomorrow. I wanted to build a redirection suite any way ;)

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

Postby dcz » Tue Jun 27, 2006 11:30 pm

Actually, was easy, so here for integramod :

Open :

Code: Select all
viewtopic.php



Find :

Code: Select all
if ( !isset($topic_id) && !isset($post_id) )
{
   message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
}


Replace with :


Code: Select all
if ( !isset($topic_id) && !isset($post_id) )
{
   // www.phpBB-SEO.com SEO TOOLKIT BEGIN
      header("Status: 301 Moved Permanently", false, 301);
      header("Location: http://www.example.com/");
   exit();
   //message_die(GENERAL_MESSAGE, 'Topic_post_not_exist');
   // www.phpBB-SEO.com SEO TOOLKIT END
}


Just put the URL you want instead of www.example.com ;)

This will HTTP 301 redirect all deleted topics once and for all to the selected URL :D
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: 21407
Joined: Fri Apr 28, 2006 9:03 pm

Postby jolin » Tue Jun 27, 2006 11:33 pm

dcz wrote:Well it depends.

First, if you deleted those topic and re imported others in the same board then, the new one should have a new ID, and the older Id should not be used any more.

If this is the case, then, something is possible ;)

We just need to know what where the deleted IDs, or will redirect every deleted topic at once which would cover all cases, even better.

++


That is the case - the old ID's shouldn't be used! and they should all be 301 permenanty redirected to the homepage.

We need to redirect every deleted topic no matter what.

(I'll just need to wait again for Google to reindex the board correctly with the new ID's)

But I need to do it ASAP as there are so many crawlers on the net you never know where you pages end up!

Thanx a lot for your support :wink:
jolin
 
Posts: 17
Joined: Thu May 04, 2006 2:27 pm

Not the exactly the same code as in IntegraMOD

Postby jolin » Wed Jun 28, 2006 12:38 am

Hmmm, funny how did you know I was using IntegraMOD :roll: :wink:

Well it works! :D

But not exactly as you said really.

The code on IntegraMOD viewtopic.php is slightly different then what you referred and the 'Topic_post_not_exist' message shows up 4 times on the page.

I have replaced all of them with your redirect code as it didn't work with the first 2 occurrences :roll:

I tried to post the original IntegraMOD 1.4.0 viewtopic.php page but it was to long for the post. :x


Please have a quick look at what are the other occurrences of the 'Topic_post_not_exist' message mean.

I don't want to banned for life from Google :?

(I'm a woman I'm allowed to be histerical)
Last edited by jolin on Wed Jun 28, 2006 12:45 am, edited 1 time in total.
jolin
 
Posts: 17
Joined: Thu May 04, 2006 2:27 pm

Postby dcz » Wed Jun 28, 2006 12:41 am

way to go then ;)


[EDIT] No worries, this message if for when topic do not exist, so it's ok if you had to do it more than once ;)


Just try some deleted urls to be sure ;)

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

Postby jolin » Wed Jun 28, 2006 12:54 am

Cool :D

Thanx a lot for your promt reply and support.
jolin
 
Posts: 17
Joined: Thu May 04, 2006 2:27 pm

Postby dcz » Wed Jun 28, 2006 12:56 am

You're Welcome ;)
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: 21407
Joined: Fri Apr 28, 2006 9:03 pm


Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 8 guests