Soft 404 Errors

Support for the phpBB3 SEO mods released in the phpBB3 SEO Toolikt forum.

Moderator: Moderators

Soft 404 Errors

Postby piwko » Thu Apr 19, 2012 1:36 pm

Hello

I have removed lot of topics from my forum. Google sent me message on Webmaster tools that there are problems with
Soft 404 errors

Google sent me some example pages of my Soft 404 errors: http:/my-website-forum/forum/page1475.html which redirect to the last page http:/my-website-forum/forum/page350.html
The problem is that the page http:/my-website-forum/forum/page1475.html should return 404 and not do redirect 301 as I understood from 'Soft 404 errors' document.

Do you know where should I do changes to return 404 code on http:/my-website-forum/forum/page1475.html?

Note, that I have already fixed my phpBB to return 404 NOT FOUND for deleted posts, because it returned HTTP 200 OK for deleted posts.

I am using phpBB SEO mixed 0.6.2 on phpBB 3.0.6

Regards,

Ivan
piwko
 
Posts: 4
Joined: Fri Nov 27, 2009 9:12 am

Advertisement

Re: Soft 404 Errors

Postby piwko » Fri Apr 20, 2012 9:58 pm

I have already found the solution.

In file viewforum.php find the code

Code: Select all
// Make sure $start is set to the last page if it exceeds the amount
if ($start < 0 || $start > $topics_count)
{
   $start = ($start < 0) ? 0 : floor(($topics_count - 1) / $config['topics_per_page']) * $config['topics_per_page'];
}


replace it with:

Code: Select all
// Make sure $start is set to the last page if it exceeds the amount
if ($start < 0 || $start > $topics_count)
{
    header("HTTP/1.0 404 Not Found");
    trigger_error('The page does not exist');
}
piwko
 
Posts: 4
Joined: Fri Nov 27, 2009 9:12 am


Return to phpBB SEO MODS

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests