Topic/forum does not exist adn index.php redirect

Discussions about the phpBB3 Forum. How to get the best from this powerful script.
Note that there is no official support for phpBB3 here, a place to share more than to ask for.

Moderator: Moderators

Topic/forum does not exist adn index.php redirect

Postby The_Wizard » Tue Feb 03, 2009 9:21 pm

How can i redirect "The requested topic does not exist.", "The forum you selected does not exist." and index.php to www.mysite.xxx without zero dup and others mods.

edit:
or it is better to redirect "topic/forum does not exist" and www.mysite.xxx to www.mysite.xxx/index.php?

thx
The_Wizard
 
Posts: 17
Joined: Wed Dec 31, 2008 9:38 am

Advertisement

Re: Topic/forum does not exist adn index.php redirect

Postby The_Wizard » Wed Feb 04, 2009 11:00 am

i already have in .htaccess
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite\.xxx$ [NC]
RewriteRule ^(.*) http://www.mysite.xxx/$1 [QSA,L,R=301]


sry for double post.
i ve pressed quote instead of edit...
The_Wizard
 
Posts: 17
Joined: Wed Dec 31, 2008 9:38 am

Postby dcz » Wed Feb 04, 2009 12:25 pm

For the redirect, you can add them right before :
Code: Select all
trigger_error('NO_TOPIC');

in viewtopic.php and :
Code: Select all
trigger_error('NO_FORUM');

in viewforum.php.

To redirect index.php to domain's root, you can add something like :
Code: Select all
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$uri = $_SERVER['REQUEST_URI'];
If (empty($_GET)  && strpos($uri, "index.$phpEx")) {
      header("Status: 301 Moved Permanently", FALSE, 301);
      header("Location: http://www.example.com/phpBB/");
      exit();
}
// www.phpBB-SEO.com SEO TOOLKIT END

in the beginning of index.php and with the proper url for your domain ;)

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

Postby The_Wizard » Wed Feb 04, 2009 4:25 pm

what to add before
Code: Select all
trigger_error('NO_TOPIC');
and
Code: Select all
trigger_error('NO_FORUM');
The_Wizard
 
Posts: 17
Joined: Wed Dec 31, 2008 9:38 am


Return to phpBB Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Bing [Bot] and 33 guests