RewriteEngine on RewriteRule ^([a-z0-9_-]*-(f|all)[0-9]+(p[0-9]+|/index[0-9]*)?.html)$ forumdisplay.php/$1 [QSA,L]RewriteRule ^([a-z0-9_-]*-(t|p)[0-9]+(p[0-9]+|/index[0-9]*)?.html)$ showthread.php/$1 [QSA,L]RewriteCond %{REQUEST_URI} !(index.php|.css) [NC]RewriteRule ^(archive|sitemap)/(.*)$ $1/index.php/$2 [QSA,L]RewriteRule ^sitemap.html$ sitemap.php