Q:

301 htaccess redirects with numbers in URLs

I would like to redirect the following link: 
http://domain.com/forum1/threads/1023/

to:
http://domain.com/forum2/showthread.php?t=1023

Please help me with the appropriate .htaccess rules.
I tried the following with no success:
RewriteRule ^forum1/thread/(\d+)/$ /forum2/showthread.php?t=$1 [R=301,L]

A:

You can use this rule:
RewriteEngine On

RewriteRule ^forum1/threads/([0-9]+)/?$ /forum2/showthread.php?t=$1 [L,NC,QSA,R=301]

