AliasMatch regular expression help

hi all

i was hoping someone out there might be able to help with a AliasMatch regular expression in apache.

not being competant at regex, i am always left scratching my head over anything but simple expressions

what i am trying to do is to match all but a few directories with an alias. what i can't seem to do is to exclude some directories from the match

here is what i have

AliasMatch ^/(?=.*?[a-zA-Z0-9]+)((?!content|secure|secureadmin|template|setup|sites|cards).)/?(.*)*$ /home/$1/www/$2

it is supposed to match all the directories of the domain with the exception of content, secure etc.

i have been able to get the full match to work, but as soon as i exclude directories, it just doesn't work. i have tried many other alternatives of course, but have no idea really if i am getting closer or further away from a solution.

any help would be appreciated

cheers

rs

0 Replies

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct