Reputation: 7857
Here's my current regex:
AliasMatch ^/?=(test)$ /srv/test.com/python/load.wsgi
Basically, I'm trying to send everything but the URL /test
to my load.wsgi
file so that everything else will be handled by PHP.
This regex is failing. I've also tried:
AliasMatch !^/test$
But that also failed. How can I perform the 'not match'?
Upvotes: 0
Views: 2208
Reputation: 4829
mod_rewrite is more flexible and allows any number of RewriteCond statements to modify the conditions under which a RewiteRule will be applied, such as
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/test
RewriteRule . /srv/test.com/python/load.wsgi
Upvotes: 1
Reputation: 34395
In this case, negative lookahead is your friend:
^(?!/?test$).*$
Upvotes: 1
Reputation: 6417
^[^(\/test)]
anything that doesn't start with /test
is this what you are looking for?
Upvotes: -1