RewriteRule ^t([0-9]+)-([0-9]+)/$ http://www.domain.com/forum/showthread.php?t=$1&page=$2 [L,R=301] RewriteRule ^t([0-9]+)/$ http://www.domain.com/forum/showthread.php?t=$1 [L,R=301]