I have the following in my apache conf:
<LocationMatch "^/assets/.*$">
How can I put in a directive that is the opposite of this?
I tried <LocationMatch "!^/assets/.*$">
but it didn't work :(
With Apache 2.2 (not sure about previous versions), you can use a regular expression with a negative lookahead to match all root location URL-path directories other than /assets
like so:
<LocationMatch "^(?!/assets)/[^/]+">
...
</LocationMatch>
Note that this does not include the root URL-path /
itself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With