• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.4 Specific .htaccess question from phpbb3 to XF

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:


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:


And is captured by these two elements of the htaccess:

(this strips the 'phpbb3' off)
RewriteBase /
RewriteRule ^phpbb3/(.*)$ /$1 [R=301,NC,L]
(this manipulates the bit before the query string)
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