httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Add/remove Options
Date Thu, 24 Oct 1996 15:12:13 GMT
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



Mime
View raw message