tags:

views:

2598

answers:

4

I can't seem to set regex correctly for the directive.

The syntax is:

<LocationMatch regex> ... </LocationMatch>

I've tried many of the following to no avail:

<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 my default handler to None for addresses that match http://mysite/css/anything, but with no luck!

I could try setting up <Location "/admin">, and so forth, but that's just bloating

A: 

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

innaM
your right, I was barking up the wrong tree! I hade two v-host entries that really look alike, I was editing the handler for one app and testing it out on a completely different one and it never worked!
kRON
A: 

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

Luke
The syntax kRON is using works for me. And the docs are pretty clear on this.
innaM
A: 

Are you setting this in your .htaccess file or your global config file? The .htaccess file can't do LocationMatch

Alex R
A: 

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

spidie