You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Paul Sutton <pa...@ukweb.com> on 1996/10/24 17:12:13 UTC
Add/remove Options
This patch lets your add/remove options with Options.
At present, the Options command completely replaces any options already
set. For example, in access.conf:
<Directory /docroot>
Options FileInfo Indexes
</Directory>
Now in a sub-dir of /docroot, you want to allow Multiviews, with
Options MultiViews
However this replaces the previous setting. Instead you have to repeat
all the options again:
Options FileInfo Indexes MultiViews
This patches lets you use Options to _add_ an option to those already
in force, eg
Options +MultiViews
So the .htaccess writter doesn't need to know about the options inherited
from above. If the server admin decides to add a new option, it will
automatically be inherited by lower levels.
Similarily, options can be removed: say you have Indexes turned on
for the /docroot, but want to turn them off in this directory without
affecting the other options in force, use
Options -Indexes
These can be combined:
Options -Indexes +MultiViews
Of course, using an option without a + or - results in behaviour exactly
as before, so this patch shouldn't affect existing installations.
Internally, as the .htaccess (or access.conf section) is being processed,
options marked with + and - are collected, then when the per-dir configs
are merged, the + and - changes are made. If there are any options without
a + or -, this causes the options currently in force to be reset, then the
+ and -'s applied.
Any comments?
Paul
UK Web
Re: Add/remove Options
Posted by Brian Behlendorf <br...@organic.com>.
On Thu, 24 Oct 1996, Paul Sutton wrote:
> This patches lets you use Options to _add_ an option to those already
> in force, eg
>
> Options +MultiViews
>
> So the .htaccess writter doesn't need to know about the options inherited
> from above. If the server admin decides to add a new option, it will
> automatically be inherited by lower levels.
+1 on the idea and the code. It compiles clean and works as expected, at least
on the simple test cases I've done.
Brian
--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com www.apache.org hyperreal.com http://www.organic.com/JOBS