On Thursday 02 March 2006 15:34, Geoffrey Young wrote:
> thanks for the detailed explanations.  torsten++ :)
>
> > That leads to an error saying that "<Directory" is not allowed at that
> > point.
> >
> > But, a few thing cannot be applied by means of $r->add_config. For
> > example "AllowOverride" needs a "Directory" block
>
> I think what most people don't understand about $r->add_config() is that
> it's .htaccess-style configuration injection.  so, if you can't use a given
> config from an .htaccess file you can't use add_config() for it either.

Well, that is not entirely true at least if the mentioned patch is applied. 
For example AllowOverride cannot be used in a .htaccess. But with the patch 
you can say:

  $r->add_config( ['<Directory />',
                   'AllowOverride AuthConfig Options=Indexes,ExecCGI',
                   '</Directory>',
                  ], ~0, '' );

If done in a MapToStorage handler that returns DECLINED it even affects the 
subsequent processing of a .htaccess file.

Or to do something like .htaccess processing:

use Apache2::Access;
use Apache2::RequestUtil;

{
  local @ARGV=($htaccess_file_name);
  $r->add_config( [<>], $r->allow_override, '/', $r->allow_override_opts );
}

Torsten

Attachment: pgpCuQDFuW3yB.pgp
Description: PGP signature

Reply via email to