phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
How to 301 redirect phpBB deleted topics to the homepage?

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
::  
Author Message
jolin



Joined: 04 May 2006
Posts: 17

How to 301 redirect phpBB deleted topics to the homepage?Posted: Tue Jun 27, 2006 11:07 pm    Post subject: How to 301 redirect phpBB deleted topics to the homepage?

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. Crying or Very sad Crying or Very sad Crying or Very sad

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?
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

How to 301 redirect phpBB deleted topics to the homepage?Posted: Tue Jun 27, 2006 11:16 pm    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

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 Wink

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 Wink

++

_________________
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
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

How to 301 redirect phpBB deleted topics to the homepage?Posted: Tue Jun 27, 2006 11:30 pm    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

Actually, was easy, so here for integramod :

Open :

Code:
viewtopic.php



Find :

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


Replace with :


Code:
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 Wink

This will HTTP 301 redirect all deleted topics once and for all to the selected URL Very Happy

_________________
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
Visit poster's website
jolin



Joined: 04 May 2006
Posts: 17

How to 301 redirect phpBB deleted topics to the homepage?Posted: Tue Jun 27, 2006 11:33 pm    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

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 Wink

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
Back to top
Visit poster's website
jolin



Joined: 04 May 2006
Posts: 17

How to 301 redirect phpBB deleted topics to the homepage?Posted: Wed Jun 28, 2006 12:38 am    Post subject: Not the exactly the same code as in IntegraMOD

Hmmm, funny how did you know I was using IntegraMOD Rolling Eyes Wink

Well it works! Very Happy

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 Rolling Eyes

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


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 Confused

(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
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

How to 301 redirect phpBB deleted topics to the homepage?Posted: Wed Jun 28, 2006 12:41 am    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

way to go then Wink


[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 Wink


Just try some deleted urls to be sure Wink

++

_________________
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
Visit poster's website
jolin



Joined: 04 May 2006
Posts: 17

How to 301 redirect phpBB deleted topics to the homepage?Posted: Wed Jun 28, 2006 12:54 am    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

Cool Very Happy

Thanx a lot for your promt reply and support.
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

How to 301 redirect phpBB deleted topics to the homepage?Posted: Wed Jun 28, 2006 12:56 am    Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage?

You're Welcome Wink

_________________
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
Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB Forum
Page 1 of 1

Navigation Similar Topics

Jump to: