- Код: Выделить всё
RewriteEngine On
#start some base pages
RewriteRule faq(_([a-z0-9-]+))?\.html /faq.php?mode=$2 [L,QSA]
RewriteRule rules\.html /rules.php [L,QSA]
RewriteRule signup\.html /signup.php [L,QSA]
RewriteRule login\.html /login.php [L,QSA]
RewriteRule sitemap\.xml /sitemap.php [L,QSA]
#end some base pages
#start forum pages
RewriteRule forum/$ /phpbb2.php [L,QSA]
RewriteRule forum/search\.html$ /phpbb2.php?page=search [L,QSA]
RewriteRule forum/newposts\.html$ /phpbb2.php?page=search&search_id=newposts [L,QSA]
RewriteRule forum/(.*)-topics\.html$ /phpbb2.php?page=search&search_id=egosearch [L,QSA]
RewriteRule forum/unanswered\.html$ /phpbb2.php?page=search&search_id=unanswered [L,QSA]
RewriteRule user/(.*)/topics/$ /phpbb2.php?page=search&search_author=$1 [L,QSA]
#end forum pages
# forum topic with parents
RewriteRule forum/[/\w-]+/[a-z0-9_-]*-t([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1 [L,QSA]
RewriteRule forum/[/\w-]+/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1&start=$2 [L,QSA]
#forum topic without parents
RewriteRule forum/[\w-]+-t([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1 [L,QSA]
RewriteRule forum/[\w-]+-t([0-9]+)-([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1&start=$2 [L,QSA]
#print pages
RewriteRule forum/[/\w-]*/[\w-]*-t([0-9]+)_print\.html$ /phpbb2.php?page=viewtopic&t=$1&printertopic=1 [L,QSA]
RewriteRule forum/[/\w-]*/[\w-]*-t([0-9]+)_print-([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1&printertopic=1&start=$2 [L,QSA]
RewriteRule forum/[/\w-]*/[\w-]*-t([0-9]+)_print-full\.html$ /phpbb2.php?page=viewtopic&t=$1&printertopic=1&finish_rel=-10000 [L,QSA]
#post pages
RewriteRule forum/post([0-9]+)\.html$ /phpbb2.php?page=viewtopic&p=$1 [L,QSA]
#search pagination
RewriteRule forum/search-([0-9]+)\.html$ /phpbb2.php?page=search&start=$1 [L,QSA]
#forum urls with id
RewriteRule forum/[a-z0-9_-]*-f([0-9]+)-([0-9]+)/$ /phpbb2.php?page=viewforum&f=$1&start=$2 [L,QSA]
#topic urls with id
RewriteRule forum/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1&start=$2 [L,QSA]
#base topic urls
RewriteRule forum/topic([0-9]+)\.html$ /phpbb2.php?page=viewtopic&t=$1 [L,QSA]
#torrents page
RewriteRule torrents/page([0-9]+)\.html$ /browse.php?page=$1 [L,QSA]
RewriteRule torrents/$ /browse.php [L,QSA]
#details page with id
RewriteRule [/\w-]*-t([0-9]+)(-([0-9]+))?\.html$ /details.php?id=$1&page=$3 [L,QSA]
#base details page
RewriteRule details([0-9]+)\.html$ /details.php?id=$1 [L,QSA]
#torrent download
RewriteRule [/\w-]*-t([0-9]+)\.torrent$ /details.php?id=$1&action=download [L,QSA]
#comment url
RewriteRule comment([0-9]+)\.html$ /comment.php?cid=$1 [L,QSA]
RewriteRule comment\.html$ /comment.php [L,QSA]
#profile without id
RewriteRule user/(.*)/comments/(page([0-9]+)\.html)?$ /userdetails.php?un=$1&action=comments_history&page=$3 [L,QSA]
RewriteRule user/(.*)/(.*)/$ /userdetails.php?un=$1&action=$2 [L,QSA]
RewriteRule user/(.*)/$ /userdetails.php?un=$1 [L,QSA]
#index pagination
RewriteRule page([0-9]+)\.html$ /index.php?page=$1 [L,QSA]
#some search
RewriteRule torrents\/tags/(.*)/$ /browse.php?search_in=3&search=$1 [L,QSA]
RewriteRule torrents\/descr/(.*)/$ /browse.php?search_in=2&search=$1 [L,QSA]
RewriteRule torrents\/name/(.*)/$ /browse.php?search_in=1&search=$1 [L,QSA]
#forum categories without id
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule forum/([\w-]*)/$ /phpbb2.php?uri=$1 [L,QSA]
#forum forums without id
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule forum/([/\w-]*)/page([0-9]+)\.html$ /phpbb2.php?page=viewforum&uri=$1&start=$2 [L,QSA]
#forum forums without id
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule forum/([/\w-]*)/$ /phpbb2.php?page=viewforum&uri=$1 [L,QSA]
#browse categories without id
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([/a-z0-9_-]*)/$ /browse.php?uri=$1 [L,QSA]
#browse categories without id pagination
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ([/a-z0-9_-]*)/page([0-9]+)\.html$ /browse.php?uri=$1&page=$2 [L,QSA]
Если трекер в папке, то надо добавить RewriteBase
