I frequently see the ?!
combination in RewriteCond
given in .htaccess
files, like this:
RewriteCond %{REQUEST_URI} ^(?!/slim_demo/index\.php).*$
To my understanding, this directive checks if /slim_demo/index.php
isn't part of the REQUEST_URI
. Which is odd; what is the use of the ?
at the very front, especially when it has no preceding character to match. The documentation says that ?
"makes the match optional", but the only thing preceding the ?
is the grouping bracket. Does it mean that ?
is making grouping optional? Makes so sense!
What is the mystery?