htaccess第二次重写规则不起作用

I made a website and placed this code in the .htaccess file

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule  (.*)$ profile.php?id=$1 [QSA,L]
RewriteRule  (.*)$ category.php?id=$1 [QSA,L]

Now, the first Rewrite rule works as expected, allowing me to have urls like site.com/profile instead of site.com/profile.php?id=foo.. but, when I added the second one, to achive the same result as the above solution, the page breaks down, and the css does not get included. So, it seems that the two can not be writen together, and I don't know what the solution is.

Try changing to:

RewriteRule  ^profile/(.*)$ profile.php?id=$1 [QSA,L]
RewriteRule  ^category/(.*)$ category.php?id=$1 [QSA,L]