0

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

George
  • 1

1 Answers1

0

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

fission
  • 3,506
  • 2
  • 20
  • 27