<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /forum/
RewriteRule ^forum/([0-9]+)/page/([0-9]+)$ /forum/forum.php?id=$1&page=$2 [L,QSA]
RewriteRule ^forum/([0-9]+)$ /forum/forum.php?id=$1 [L,QSA]
RewriteRule ^topic/([0-9]+)/page/([0-9]+)$ /forum/topic.php?id=$1&page=$2 [L,QSA]
RewriteRule ^topic/([0-9]+)$ /forum/topic.php?id=$1 [L,QSA]
RewriteRule ^tags/(.+)/page/([0-9]+)$ /forum/tags.php?tag=$1&page=$2 [L,QSA]
RewriteRule ^tags/(.+)/?$ /forum/tags.php?tag=$1 [L,QSA]
RewriteRule ^tags/?$ /forum/tags.php [L,QSA]
RewriteRule ^profile/([0-9]+)/page/([0-9]+)$ /forum/profile.php?id=$1&page=$2 [L,QSA]
RewriteRule ^profile/([0-9]+)/([a-z]+)$ /forum/profile.php?id=$1&tab=$2 [L,QSA]
RewriteRule ^profile/([0-9]+)/([a-z]+)/page/([0-9]+)$ /forum/profile.php?id=$1&tab=$2&page=$3 [L,QSA]
RewriteRule ^profile/([0-9]+)$ /forum/profile.php?id=$1 [L,QSA]
RewriteRule ^view/([a-z-]+)/page/([0-9]+)$ /forum/view.php?view=$1&page=$2 [L,QSA]
RewriteRule ^view/([a-z-]+)$ /forum/view.php?view=$1 [L,QSA]
RewriteRule ^rss/$ /forum/rss.php [L,QSA]
RewriteRule ^rss/forum/([0-9]+)$ /forum/rss.php?forum=$1 [L,QSA]
RewriteRule ^rss/topic/([0-9]+)$ /forum/rss.php?topic=$1 [L,QSA]
RewriteRule ^rss/tags/([a-z]+)$ /forum/rss.php?tag=$1 [L,QSA]
RewriteRule ^rss/profile/([0-9]+)$ /forum/rss.php?profile=$1 [L,QSA]
</ifmodule>