Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

[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

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.