I have this rewrite rule
RewriteRule (.*)/([^/\.]+).css$ include/style/styleRedir.php?css=$2.css [L,NC]
which matches thing like:
somefolder/foo.css
and rewirites them to:
include/style/styleRedir.php?css=foo.css
however it won't match:
foo.css
So I tried changing it to:
RewriteRule (.*)(/?)([^/\.]+).css$ include/style/styleRedir.php?css=$3.css [L,NC]
but then it would rewrite to:
include/style/styleRedir.php?css=.css
So how could I make this RewriteRule so it can rewrite foo.css to include/style/styleRedir.php?css=foo.css