tags:

views:

15

answers:

1

I have one location match that correctly works:

<LocationMatch "^/user/storage/subaccounts(/[a-zA-Z0-9]+)?/?$">

this correctly forwards for something like /user/storage/subaccounts/exampleuser or /user/storage/subaccounts/

I'd like to setup a locationmatch for /user/storage/subaccounts/exampleuser/admin

My attempt at this was:

<LocationMatch "^/user/storage/subaccounts(/[a-zA-Z0-9]+)?/?admin/?$">

Which doesn't work. Would someone be so kind as to point out my error and help me with a correct version? Thanks!

+1  A: 

Although there's an unneeded question mark before "admin", this should work fine for the sample URL you give. The error is likely not in the regex but the directive you apply on the result of the regex. <LocationMatch> by itself does not do any redirection - it simply matches the URL.

Max Shawabkeh