I need to apply some configuration for a Location Directive.
These configurations must be applied for all location, except some URIs
(e.g. I don't wanna change configs for /products
, so bellow configuration must be applied for all locations, except /products )
<Location />
# desired configurations
</Location>
This can be done in several ways:
1. Using regex
Use regex in Location Directive to match all URIs, except your pattern
e.g.:
use If inside your directory:
or
Set a variable at start of configurations, and then use directive
or you can use expr in If directive for comparing strings and variables.
Useful link