I've the next line, however it does not appear to operate, anybody will easily notice me where I'm going wrong?

RewriteRule ^(.*)\.css css.php?

I've other lines above however i don't think they're relevent.

However I have another line below what is all about every other file.

RewriteRule ^(.*) index.php?

so that they seem like so:

RewriteRule ^(.*)\.css css.php?
RewriteRule ^(.*) index.php?

I simply need all css request to undergo the css.php first then which will return a css file content.

Make use of the following rule. All css demands is going to be forwarded to css.php, all JS demands is going to be forwarded to js.php. [L] means: Last rule, to ensure that later rules don't affect this rule.

I have also added another line, to avoid index.php redirecting to index.php within an infinite loop.

RewriteRule ^(.*)\.(css|js) $2.php?$1 [L]
RewriteRule ^index.php index.php [L] #Prevent infinite loops
RewriteRule ^(.*) index.php
RewriteRule ^(.*)\.css css.php?$1

$1 consists of this content in the brackets.