Redirect from phpbb subforum to main forum?

Discussions about Apache mod Rewrite, .htaccess, Use, experiences ... URL Rewriting.

Moderator: Moderators

Redirect from phpbb subforum to main forum?

Postby arch_stanton » Tue Oct 09, 2007 7:24 pm

dcz, I want to move all threads from a couple of subforums back into the parent forum and then delete the subforums.

The trouble is that I have some good backlinks to the subforum URLs, which I don't want to throw away.

I guess the answer is to add a line or two to my .htaccess, so that incoming links to those subforum URLs will be redirected to the parent forum.

In other words, let's say the URLs are:

-www.mydomain.com/forum/starwars/leia-f25 and
-www.mydomain.com/forum/starwars/luke-f26

What lines do I need so that they both redirect to
-www.mydomain.com/forum/starwars-f11?

Thanks. :)
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Advertisement

Postby dcz » Thu Oct 11, 2007 7:55 am

Is this dealing with phpBB2 or phpBB3 ?

Please post in the appropriate forum.

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

Postby arch_stanton » Thu Oct 11, 2007 7:32 pm

phpbb3

Sorry, I thought this was the correct forum, as it's a mod rewrite query as far as I can tell rather than a phpbb one. But feel free to move the topic to a more appropriate place if you think it shouldn't be here.

I only want two URLs to be redirected into one. So would the following work?

redirect 301 forum/starwars/leia-f25 http://www.mydomain.com/forum/starwars-f11 and

redirect 301 forum/starwars/luke-f26 http://www.mydomain.com/forum/starwars-f11 ?

And if so, where in the htaccess should they go? Above the main phpbb mod rewrite rules or below?

Thanks. :)
arch_stanton
PR1
PR1
 
Posts: 163
Joined: Wed Oct 04, 2006 9:48 am

Postby dcz » Sun Oct 21, 2007 11:53 am

Well, mod_rewrite does not seems to me to be the best way to deal with this, but it depends.

If you only have few redirect to perform, you can hard code them in the .htaccess, but if you have many, doing it with php could be better.

Your redirects should work and shall be placed before the RewriteEngine on, since it's not mod_rewrite.

Have you tested them ?

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


Return to Apache mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 4 guests