Mailing List Archive

RewriteCond - is this fast fail?
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-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
The implicit behaviour for multiple RewriteCond directives is AND, unless
you use [OR].

So without [OR], all the conditions have to match to apply the rewrite rule.

On Tue, Jan 10, 2023 at 6:06 PM sebb <sebbaz@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-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: RewriteCond - is this fast fail? [ In reply to ]
On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
Do a quick test, and enable the rewrite log. Make sure you use a log level
of 5 to see those details.

On Tue, Jan 10, 2023 at 6:28 PM sebb <sebbaz@gmail.com> wrote:

> On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
Re: RewriteCond - is this fast fail? [ In reply to ]
On Tue, 10 Jan 2023 at 23:33, Frank Gingras <thumbs@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?

> On Tue, Jan 10, 2023 at 6:28 PM sebb <sebbaz@gmail.com> wrote:
>>
>> On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
>> >> For additional commands, e-mail: users-help@httpd.apache.org
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
On 2023-01-11 12:58, sebb wrote:
> On Tue, 10 Jan 2023 at 23:33, Frank Gingras <thumbs@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.

>
>> On Tue, Jan 10, 2023 at 6:28 PM sebb <sebbaz@gmail.com> wrote:
>>>
>>> On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
>>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
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 <thumbs@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 <sebbaz@gmail.com> wrote:
>>>>
>>>> On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
>>>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>>> For additional commands, e-mail: users-help@httpd.apache.org
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
Thanks, that's very helpful.

Maybe this info could be added to the user docs?

On Wed, 11 Jan 2023 at 12:18, Daniel Gruno <humbedooh@apache.org> wrote:
>
> 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 <thumbs@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 <sebbaz@gmail.com> wrote:
> >>>>
> >>>> On Tue, 10 Jan 2023 at 23:21, Frank Gingras <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
> >>>>>> For additional commands, e-mail: users-help@httpd.apache.org
> >>>>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >>>> For additional commands, e-mail: users-help@httpd.apache.org
> >>>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >> For additional commands, e-mail: users-help@httpd.apache.org
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
On Wed, 2023-01-11 at 13:12 +0000, sebb wrote:
> Thanks, that's very helpful.
>
> Maybe this info could be added to the user docs?

There's a useful flow diagram that shows this:

https://httpd.apache.org/docs/current/rewrite/intro.html

Granted, I'm sure it could be made clearer and/or more explicit.


> > > 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 <sebbaz@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > On Tue, 10 Jan 2023 at 23:21, Frank Gingras
> > > > > > <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > > > users-help@httpd.apache.org
> > > > > > > >
> > > > > >
> > > > > > -----------------------------------------------------------
> > > > > > ----------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > > > For additional commands, e-mail:
> > > > > > users-help@httpd.apache.org
> > > > > >
> > > >
> > > > ---------------------------------------------------------------
> > > > ------
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > >
> > >
> > > -----------------------------------------------------------------
> > > ----
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> >
> > -------------------------------------------------------------------
> > --
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

> On Wed, 11 Jan 2023 at 12:18, Daniel Gruno <humbedooh@apache.org>
> wrote:
> >
> > 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 <thumbs@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 <sebbaz@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > On Tue, 10 Jan 2023 at 23:21, Frank Gingras
> > > > > > <thumbs@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 <sebbaz@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-unsubscribe@httpd.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > > > users-help@httpd.apache.org
> > > > > > > >
> > > > > >
> > > > > > -----------------------------------------------------------
> > > > > > ----------
> > > > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > > > For additional commands, e-mail:
> > > > > > users-help@httpd.apache.org
> > > > > >
> > > >
> > > > ---------------------------------------------------------------
> > > > ------
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > >
> > >
> > > -----------------------------------------------------------------
> > > ----
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >
> >
> > -------------------------------------------------------------------
> > --
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
On Wed, 2023-01-11 at 10:15 -0500, rbowen@rcbowen.com wrote:
> On Wed, 2023-01-11 at 13:12 +0000, sebb wrote:
> > Thanks, that's very helpful.
> >
> > Maybe this info could be added to the user docs?
>
> There's a useful flow diagram that shows this:
>
> https://httpd.apache.org/docs/current/rewrite/intro.html
>
> Granted, I'm sure it could be made clearer and/or more explicit.


How's this:

[rbowen@avistetto:manual/mod]$ svn diff

Index: mod_rewrite.xml
===================================================================
--- mod_rewrite.xml (revision 1906604)
+++ mod_rewrite.xml (working copy)
@@ -1059,6 +1059,13 @@
the homepage is served. Otherwise, the standard page is
served.
</p>

+ <p>By default, multiple <directive>RewriteCond</directive>s
+ are evaluated in sequence with an implied logical
<strong>AND</strong>.
+ If a condition fails, in the absence of an
+ <strong><code>OR</code></strong> flag, the entire ruleset is
abandoned,
+ and further conditions are not evaluated.
+ </p>
+
</usage>

</directivesynopsis>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
On Wed, 2023-01-11 at 10:26 -0500, rbowen@rcbowen.com wrote:
> On Wed, 2023-01-11 at 10:15 -0500, rbowen@rcbowen.com wrote:
> > On Wed, 2023-01-11 at 13:12 +0000, sebb wrote:
> > > Thanks, that's very helpful.
> > >
> > > Maybe this info could be added to the user docs?
> >
> > There's a useful flow diagram that shows this:
> >
> > https://httpd.apache.org/docs/current/rewrite/intro.html
> >
> > Granted, I'm sure it could be made clearer and/or more explicit.
>
>
> How's this:

Committed in r1906605 in trunk. I'll put that in the 2.4 docs also in a
moment.


>
> [rbowen@avistetto:manual/mod]$ svn diff
>
> Index: mod_rewrite.xml
> ===================================================================
> --- mod_rewrite.xml     (revision 1906604)
> +++ mod_rewrite.xml     (working copy)
> @@ -1059,6 +1059,13 @@
>          the homepage is served. Otherwise, the standard page is
> served.
>          </p>
>  
> +        <p>By default, multiple <directive>RewriteCond</directive>s
> +        are evaluated in sequence with an implied logical
> <strong>AND</strong>.
> +        If a condition fails, in the absence of an
> +        <strong><code>OR</code></strong> flag, the entire ruleset is
> abandoned,
> +        and further conditions are not evaluated.
> +        </p>
> +
>  </usage>
>  
>  </directivesynopsis>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
On Wed, 2023-01-11 at 10:33 -0500, rbowen@rcbowen.com wrote:
> On Wed, 2023-01-11 at 10:26 -0500, rbowen@rcbowen.com wrote:
> > On Wed, 2023-01-11 at 10:15 -0500, rbowen@rcbowen.com wrote:
> > > On Wed, 2023-01-11 at 13:12 +0000, sebb wrote:
> > > > Thanks, that's very helpful.
> > > >
> > > > Maybe this info could be added to the user docs?
> > >
> > > There's a useful flow diagram that shows this:
> > >
> > > https://httpd.apache.org/docs/current/rewrite/intro.html
> > >
> > > Granted, I'm sure it could be made clearer and/or more explicit.
> >
> >
> > How's this:
>
> Committed in r1906605 in trunk. I'll put that in the 2.4 docs also in
> a
> moment.

In 2.4 docs in r1906607.

Thanks for driving this improvement.

--Rich



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: RewriteCond - is this fast fail? [ In reply to ]
Thanks!

On Wed, 11 Jan 2023 at 15:42, <rbowen@rcbowen.com> wrote:
>
> On Wed, 2023-01-11 at 10:33 -0500, rbowen@rcbowen.com wrote:
> > On Wed, 2023-01-11 at 10:26 -0500, rbowen@rcbowen.com wrote:
> > > On Wed, 2023-01-11 at 10:15 -0500, rbowen@rcbowen.com wrote:
> > > > On Wed, 2023-01-11 at 13:12 +0000, sebb wrote:
> > > > > Thanks, that's very helpful.
> > > > >
> > > > > Maybe this info could be added to the user docs?
> > > >
> > > > There's a useful flow diagram that shows this:
> > > >
> > > > https://httpd.apache.org/docs/current/rewrite/intro.html
> > > >
> > > > Granted, I'm sure it could be made clearer and/or more explicit.
> > >
> > >
> > > How's this:
> >
> > Committed in r1906605 in trunk. I'll put that in the 2.4 docs also in
> > a
> > moment.
>
> In 2.4 docs in r1906607.
>
> Thanks for driving this improvement.
>
> --Rich
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org