Looking For Help

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

Looking For Help

Postby a4tech » Sun Oct 21, 2012 3:41 pm

Hello Sir, I am using PHPBB SEO Premod. I am wanted to redirect the deleted topics to index. How to made this possible that all deleted topics auto redirect to index.

The requested topic does not exist move to index

Thank You.
Regards,
a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Advertisement

Re: Looking For Help

Postby HB » Sun Oct 21, 2012 4:02 pm

Open viewtopic.php and find:

Code: Select all
// Do we have a topic or post id?
if (!$topic_id && !$post_id)
{
   trigger_error('NO_TOPIC');
}


Replace with:

Code: Select all
// Do we have a topic or post id?
if (!$topic_id && !$post_id)
{
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url']);   
   exit;
}
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1509
Joined: Mon Oct 16, 2006 2:25 am

Re: Looking For Help

Postby a4tech » Tue Oct 23, 2012 7:18 am

its not working?

is there any thing that is required to add in .htacess file.

I tried in different browsers but still no work? Please take a look.

Thank You.
a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Re: Looking For Help

Postby HB » Wed Oct 24, 2012 6:17 pm

Not sure what's wrong, you may be exiting from another exit point in viewtopic.php. No .htaccess change is required; it's just sending a 301 redirect in response to a topic request that's not found.
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1509
Joined: Mon Oct 16, 2006 2:25 am

Re: Looking For Help

Postby a4tech » Wed Oct 24, 2012 6:27 pm

Sir, This is the location where I paste the code but its not working.

Code: Select all
/**
* @todo normalize?
*/
$hilit_words   = request_var('hilit', '', true);

// Do we have a topic or post id?
if (!$topic_id && !$post_id)
{
   $phpbb_seo->seo_redirect($phpbb_seo->seo_path['phpbb_url']);   
   exit;
}

// Find topic id if user requested a newer or older topic
if ($view && !$post_id)
{
   if (!$forum_id)
   {
      $sql = 'SELECT forum_id
         FROM ' . TOPICS_TABLE . "

a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Re: Looking For Help

Postby a4tech » Thu Oct 25, 2012 7:51 pm

My board version is Board version: 3.0.9 is there any version difference?
a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Re: Looking For Help

Postby a4tech » Sun Oct 28, 2012 3:33 pm

I am wanted to share the viewtopic.php file. But here is the word limit. Will you please send me your emails address?
a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Re: Looking For Help

Postby a4tech » Sun Nov 25, 2012 2:41 pm

bump
a4tech
 
Posts: 10
Joined: Wed Dec 14, 2011 5:53 pm

Re: Looking For Help

Postby HB » Tue Nov 27, 2012 7:32 pm

I don't have viewtopic.php in front of me, but there are multiple exit points for posts/topics not found. Insert some echo's and apply the same code you posted earlier (in other words, I believe you can figure this out with some additional effort :) ).
Dan Kehn
HB
phpBB SEO Team
phpBB SEO Team
 
Posts: 1509
Joined: Mon Oct 16, 2006 2:25 am


Return to phpBB SEO Premod

Who is online

Users browsing this forum: No registered users and 19 guests