https://bz.apache.org/bugzilla/show_bug.cgi?id=64511

--- Comment #8 from Vincent Huisman <[email protected]> ---
(In reply to Rich Bowen from comment #7)
> Fixed in r1933768 (trunk) and r1933769 (2.4.x).
> 
> After deeper investigation of the mod_alias.c source, it became
> clear that the Alias directive has two forms with different context
> rules: the two-argument form is server/vhost only, while the
> one-argument form works in <Location>, <Proxy>, and <If> but not
> <Directory> or <Files>. Added a "Context restrictions" note to the
> Alias directive documentation explaining this.

Are you sure about this? Yesterday, after coming across your exact
documentation  change, I thought "hey I need this" and I tried to use this in a
<VirtualHost>:
  <Location "/file">
    <If "! -f 'file'">
      Alias "/var/www/otherfile"
    </If>
  </Location>

But Apache 2.4.66 told me:
  AH00526: Syntax error on [...]:
  Alias cannot occur within <If> section

I have no reason to assume it's going to be different on trunk, since
mod_alias.c hasn't been touched in three years. Going back an additional 11
years into 2012, there's r1406495 where <If> was added to the NOT_IN_FILES
check (now in core.c L1368) with a friendly remark why that wasn't the best
choice. I'm unsure if that commit message still holds true today, in any case
it seems that either the logic or the new documentation is wrong. And I'd
personally hope your documentation is supposed to be correct, or I'll have to
come up with another way to achieve my goal.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to