RewriteEngine On
RewriteRule ^forum/?$ forum.php [L,QSA]
RewriteRule ^forum/([^/]+)/?$ forum.php?topic=$1 [L,QSA]
