Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

[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!!

share|improve this question

1 Answer 1

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.)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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