| :: |
| Author |
Message |
jolin
Joined: 04 May 2006 Posts: 17
|
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.
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 |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
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
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 || 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 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
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 :
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
This will HTTP 301 redirect all deleted topics once and for all to the selected URL  |
_________________ 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 |
|
 |
jolin
Joined: 04 May 2006 Posts: 17
|
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
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  |
|
|
| Back to top |
|
 |
jolin
Joined: 04 May 2006 Posts: 17
|
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
Well it works!
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
I tried to post the original IntegraMOD 1.4.0 viewtopic.php page but it was to long for the post.
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 |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
|
| Back to top |
|
 |
jolin
Joined: 04 May 2006 Posts: 17
|
Posted: Wed Jun 28, 2006 12:54 am Post subject: Re: How to 301 redirect phpBB deleted topics to the homepage? |
|
|
Cool
Thanx a lot for your promt reply and support. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 15127
|
|
| Back to top |
|
 |
|
|