I have created a route plus controller for doing dynamic css in ruby on rails as per the instructions here:
http://www.misuse.org/science/2006/09/26/dynamic-css-in-r
Use a regex to match the filename?
map.connect 'rcss/:rcssfile', :controller => 'rcss', :action => 'rcss', :requirements => {:rcssfile => /.+\.rcss/ }
This would match (anything).rcss - you could adjust the regex for various suffixes.