Rewriting URLs
-
I switched from phpBB to bbPress recently thanks very much in part to a script found in these forums.
Now, many of the existing posts contain links to each other in the old phpBB format /topic.php?t=123. Since the topic IDs have stayed the same in the conversion process, I’d like to use ModRewrite to automatically redirect to the new /topic/123 URL scheme. I’ve tried the following in my .htaccess, but it doesn’t appear to work. (Admittedly, my knowledge of ModRewrite is shaky at best.)
RewriteEngine on
RewriteRule ^/forums/viewtopic.php?t=([0-9]+)$
/forums/topic/$1 [R](In the real code there isn’t a linebreak on the second line.)
Does anyone have any advice?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.