Hi guys and gals,
I'm trying to create a rule used in a .htaccess file to match anything but a particular string, in this case: index
.
I thought that it should be possible to match this special string first and use [L]
but that's not working,
and it should be possible using the following regex, but it causes a 500 error.
I want to match:
- pagename1
- pagename2/whatever
- pagename3/234/whatever
- about
- contact-us
- (etc)
but not
- index/123
- index/124/whatever
(BTW "index" is the name of a file with no extension, not my choice, this is a work thing)
^(?!index)[\w/\-]+
I assume that apache's implementation of regex doesn't cope with the (?!xxx)
rule.
Any help/suggestions will be much appreciated.