You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/02/24 19:00:48 UTC

[Bug 44181] add UnAlias

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

Jeff Wheelhouse <ap...@wheelhouse.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |apache@wheelhouse.org

--- Comment #9 from Jeff Wheelhouse <ap...@wheelhouse.org> ---
Created attachment 33589
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=33589&action=edit
Patch to allow "Alias /whatever/ !" to stop alias processing.

This hasn't seen any activity in a few years, but it's actually very easy to do
in 2.4 with a small patch (attached).

The ProxyPass directive works very similar to Alias, except it maps a proxy
rather than another directory.  With that directive, syntax like "ProxyPass
/mirror/foo/i !" can be used to stop proxy processing for a given path.  That
same syntax can be applied to alias processing.  I.e. "Alias /whatever/ !" can
be made to stop alias processing for a given path.

For example, if you have 1000 vhosts, 999 of which need an alias, then you can
create a config like this:

Alias /my_alias/ /my/real/path/

... 900 VirtualHost entries that need that alias ...

<VirtualHost>
   ...
   Alias /my_alias/ !
</VirtualHost>

... 99 more VirtualHost entries that need that alias ...

There are two spots in mod_alias that have to be touched for this to work, both
in try_alias_list: one for regular aliases and one for regular expressions.  In
both cases, if an alias matches and it maps to "!" you just stop there and
return that there was no match.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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