For instance:

HANDLER *.css --> process-css-files.php
HANDLER *.(jpg|png|gif|jpeg) --> process-image-files.php

Additionally how you can:

if (*.css EXISTS) then
   include( THAT_FILE )
   process_URL-->( process-css-files.php )

I personally use something similar to this for mixing css scripts inside the css folder to some single concatenated file:

RewriteRule ^css/(.*\.css) /combine.php?file=$1

Typically, you are likely to use mod_rewrite to redirect Web addresses. You need to place the following inside your .htaccess file (in case your server has support for this):

RewriteEngine on
RewriteRule ^/?(.+)\.css$ process-css-files.php?name=$1
RewriteRule ^/?(.+)\.(jpg|jpeg|gif|png)$ process-image-files.php?name=$1&extension=$2

That will solve part one of the question (I believe). I am sure there's a method to get .htaccess to see if personal files is available before spinning the URL, but I am more knowledgeable with PHP, so I'd most likely just always redirect towards the PHP file, after which have PHP do all of the checking and whatnot:

$name = $_GET['name'].'.css';
header('Content-type: text/css');
if (file_exists($name)) {
    echo file_get_contents($name);
} else  {
    // do whatever

In my opinion all this is often handled by .htaccess rules. Try something this:

Options +FollowSymlinks -MultiViews
RewriteEngine on

RewriteRule ^([^.]*\.(jpe?g|png|gif))$ process-image-files.php?img=$1 [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^.]*\.css)$ process-css-files.php?css=$1 [L,NC]