. binds less strong than ~= does. Using double quotes or parentheses makes your code work. Change
to&& ($DOCROOT.$uri !~ /\/$/)) {
&& ("$DOCROOT$uri" !~ /\/$/)) {
or, even better, construct a variable $local_path from $DOCROOT and $uri. Note that your webserver will allow access to directories outside of $DOCROOT if $uri contains for example ../../.
In reply to Re: problem with if condition
by Corion
in thread problem with if condition
by agn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |