Apache Register Field <LocationMatch>

I am unable to correctly set the regex for the directive.

Syntax:

<LocationMatch regex> ... </LocationMatch>

      

I've tried many of the following: [/ p>

<LocationMatch "^/(admin-media|connect|css|downloads|images|images-web|js)/.+$">
<LocationMatch "^/(admin-media|connect|css|downloads|images|images-web|js)/.+">
<LocationMatch "/(admin-media|connect|css|downloads|images|images-web|js)/.+$">
<LocationMatch "/(admin-media|connect|css|downloads|images|images-web|js)/.">

      

Basically, I'm trying to override the default handler to None for addresses that match http: // mysite / css / anything , but no luck!

I could try setting up "lt; Location" / admin "> etc, but this is just bloat

+1


a source to share


4 answers


Are you really sure your problem is with the LocationMatch directive? All your examples seem to me to be perfectly correct. I suspect you are barking up the wrong tree here.



+2


a source


Are you sure the regex is actually executed if it is placed inside a string ("") or is treated as a literal?



0


a source


Are you setting this in your .htaccess file or in your global config file? Htaccess file cannot execute LocationMatch

0


a source


Do you have a "RewriteEngine on" inside your VirtualHost directive? (and mod_rewrite enabled)

-4


a source







All Articles