RewriteEngine On

RewriteCond %{REQUEST_FILENAME} /viewforum.html
RewriteRule (.*) /index.php [L]

RewriteCond %{REQUEST_FILENAME} /kategorie-([0-9]*).html
RewriteRule (.*) /index.php?c=%1 [L]

RewriteCond %{REQUEST_FILENAME} /viewforum-([0-9]*)-([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1&topicdays=%2&start=%3 [L]

RewriteCond %{REQUEST_FILENAME} /viewforum-([0-9]*).html
RewriteRule (.*) /viewforum.php?f=%1 [L]

RewriteCond %{REQUEST_FILENAME} /thema-([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&postdays=%2&postorder=%3&start=%4 [L]

RewriteCond %{REQUEST_FILENAME} /thema-([0-9]*)-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2 [L]

RewriteCond %{REQUEST_FILENAME} /thema-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1 [L]

RewriteCond %{REQUEST_FILENAME} /thema-([0-9]*).html#([0-9]*)
RewriteRule (.*) /viewtopic.php?t=%1#%2 [L]

RewriteCond %{REQUEST_FILENAME} /thema-([0-9]*).html
RewriteRule (.*) /viewtopic.php?t=%1&start=%2&postdays=%3&postorder=%4&highlight=%5 [L]

RewriteCond %{REQUEST_FILENAME} /user-([0-9]*).html
RewriteRule (.*) /profile.php?mode=viewprofile&u=%1 [L]