On 2023-01-11 13:16, Daniel Gruno wrote:
On 2023-01-11 12:58, sebb wrote:
On Tue, 10 Jan 2023 at 23:33, Frank Gingras <thu...@apache.org> wrote:
Do a quick test, and enable the rewrite log. Make sure you use a log
level of 5 to see those details.
Whilst the test might be quick, setting it up is not.
Does no-one here know the answer?
RewriteRule is evaluated first. If that matches, the RewriteCond
directives are evaluated one at a time. If a condition fails, and there
is no [OR] flag, then the evaluation stops and does not continue to the
next RewriteCond
This is defined in
https://github.com/apache/httpd/blob/trunk/modules/mappers/mod_rewrite.c#L4230 and onwards.
FWIW, this is also why %N is only available in the substitution
argument, and not in the pattern argument of a RewriteRule, as %N hasn't
been defined at the pattern matching point of a RewriteRule.
On Tue, Jan 10, 2023 at 6:28 PM sebb <seb...@gmail.com> wrote:
On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thu...@apache.org> wrote:
The implicit behaviour for multiple RewriteCond directives is AND,
unless you use [OR].
Yes, that is documented.
So without [OR], all the conditions have to match to apply the
rewrite rule.
Yes, but are any subsequent conditions evaluated?
On Tue, Jan 10, 2023 at 6:06 PM sebb <seb...@gmail.com> wrote:
Does the first RewriteCond that fails cause any following RewriteCond
entries to be skipped?
(up to the RewriteRule)
I would hope that is the case, but AFAICT it is not explicitly
stated.
If it is the case, perhaps it would be worth making explicit?
(and suggesting that the cheapest checks are done first).
Sebb
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org