[Asked this on StackOverflow but this might be a better place]

I'm playing around with some new experimental software - and trying to use it on something other than Apache (cause I light lighty). I have, however, run into a rewrite rule issue - I can't get lighty to ignore the contents of the assets folder, which further subdivides into /assets/css/ /assets/js and other such things. I tried the following:

"^/(assets)/?(.*)" => "$0", (ripped from a tutorial website)

but that 404's - and I tried

"^/(assets)/(.)?/?(.)" => "$0",

Made up myself, not expecting it to work - above the original rewrite rule, which is meant to handle everything the software does.

Does anyone know how I can just wildcard discard everything in the /assets/ and /assets/*/ folders, and let them go straight to their designated files?

Thanks!!

link|improve this question
feedback

1 Answer

Try:

url.rewrite = ("^/assets.*/(.*)" => "$1")

That actually rewrites files in any subdirectory of /assets as if they were at the root. (It's the equivalent of basename in regex form.)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.