XF 1.4 Specific .htaccess question from phpbb3 to XF

Sap1ent

Member
Hi guys,

I've asked a lot of questions lately and had some great responses (and learnt a lot in the process!).

A few of those questions have been around .htaccess - indeed, i've learnt a lot about how it works recently.

I originally ran a phpbb3 forum and i've successfully got almost all traffic redirecting from any old urls that are still lingering around, however, one i'm having particular trouble with is structured like this:

http://www.mydomain.com/viewtopic.php?t=4277&p=41681

And i'm getting tons of crawls errors in webmaster tools specifically from those structured urls.

This appears to be because the query string doesn't include the 'f=xxxx' element.

i.e. this URL is redirected perfectly:

http://www.mydomain.com/phpBB3/viewtopic.php?f=12&t=3097&p=30329

And is captured by these two elements of the htaccess:

(this strips the 'phpbb3' off)
Code:
RewriteBase /
RewriteRule ^phpbb3/(.*)$ /$1 [R=301,NC,L]

(this manipulates the bit before the query string)
Code:
RewriteCond %{QUERY_STRING} (^|\?)f=([0-9]+)&t=([0-9]+)($|&)
RewriteRule ^viewtopic\.php$ /index.php?threads/%3/ [R=301,L]

Does anyone know how i'd redirect those broken URLs properly?

As always, thanks in advance. :D
 
Back
Top Bottom