Damien Gardner Jnr wrote:
> 
> Hi All,
> 
> Something that's been bothering me for a while now, that the apache doco's don't 
>seem to be able to help me with, is how to turn off .htaccess password authentication 
>in sub-folders of a site..  i.e. Say we have a website, with a .htaccess file in the 
>web root telling apache to pop back an authentication box and check that it's a valid 
>user.  now that all works well, but say I have a /public folder, which I don't want 
>*any* access restrictions on - I haven't managed to find out how to tell apache to 
>ignore the parent folder's settings for the current folder.. - Any Ideas? :)

Good question!

I've solved such problems with mod_perl (its Handlers) and its configuration
by simply turning off the PerlHandler for a subdirectory.

I doubt this can be done with .htaccess.
Referring to this nuggest from <http://www.apache.org/docs/configuring.html>

.htaccess Files

Apache allows for decentralized management of configuration via special files placed
inside the web tree. The special files are usually called .htaccess, but any name can
be specified in the AccessFileName directive. Directives placed in .htaccess files
apply to the directory where you place the file, and all sub-directories.
                                                     ^^^^^^^^^^^^^^^^^^^

But, as with most things perl-ish and open source, there is more than many
ways to skin a web server.

If you are using mod_perl, want you want is doable.

Reading the O'Reilly book  "Apache Modules with perl and C" p.283 ...

Write a v.simple Authentication handler, plug it into the directories
you want the username+password authentication to apply, and you're done.
With this scheme you can turn the authentication OFF in child directories,
by simpley disabling the handler in the .htaccess file.


--
Rick Welykochy || Praxis Services Pty Limited
"If talk is cheap how do entrepreneurs make money?"


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to