RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(([^/]+/)*[^.]+)$ $1.php [L]
these 2 strings mean that if your file is absent (and http://example.com/forums/category/Name
is obviously absent) you transform it to http://example.com/forums/category/Name.php
and the rules proceed further - so you have Name.php
as a parameter in your category.php instead of Name
To solve your problem just move these 2 strings below other rules.