Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Dec 2000 18:19:17 +0200
From:      Mihai Claudiu Capatina <mihai.capatina@aignet.ro>
To:        Gabriel Ambuehl <gabriel_ambuehl@buz.ch>
Cc:        isp@FreeBSD.ORG
Subject:   Re: htaccess only protecting one specific subdir?
Message-ID:  <3A2D1585.7041BA54@aignet.ro>
References:  <15473937196.20001205161309@buz.ch>

next in thread | previous in thread | raw e-mail | index | archive | help

--------------E05A6E1E5E2228DA8B20C4FF
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Let's say you have the following structure :
/my_www_root_dir-
                                      |-subdir1
                                      |-subdir2
                                      |-.htaccess

you can try to use <Directory /my_www_root_dir>
 with the right auth and after that define
<Directory /my_www_root_dir/subdir1>
with the AllowOverride None directive....

This is untested so try it at your own risc...;-)

Mick



Gabriel Ambuehl wrote:

> Hello,
> I'm desperately seeking for a way to protect a directory via .htaccess
> and basic authentication which normally is pretty easy, but I need the
> .htaccess to reside one directory level higher in the tree and still
> only protect the one subdir:
>
> /.htaccess    #should protect
> /subdir       #but leave all other files/directory open
>
> I've been searching the Apache doc for quite some time now but the
> only thing I found, which could be of some use, would be either
> <Directory> or <Location> and both seem to be valid only in the server
> conf but not in .htaccess files.
>
> TIA & Best regards,
>  Gabriel
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

--
Mihai Claudiu Capatina
Wireless Network Manager & Network Administrator

AIG S.A. ( http://www.aignet.ro )

Phone : +40 95 102862 / +40 1 3102895
Fax   : +40 1 3102896



--------------E05A6E1E5E2228DA8B20C4FF
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>Let's say you have the following structure :
<br>/my_www_root_dir-
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|-subdir1
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|-subdir2
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|-.htaccess
<p>you can try to use &lt;Directory /my_www_root_dir>
<br>&nbsp;with the right auth and after that define
<br>&lt;Directory /my_www_root_dir/subdir1>
<br>with the AllowOverride None directive....
<p>This is untested so try it at your own risc...;-)
<p>Mick
<br>&nbsp;
<br>&nbsp;
<p>Gabriel Ambuehl wrote:
<blockquote TYPE=CITE>Hello,
<br>I'm desperately seeking for a way to protect a directory via .htaccess
<br>and basic authentication which normally is pretty easy, but I need
the
<br>.htaccess to reside one directory level higher in the tree and still
<br>only protect the one subdir:
<p>/.htaccess&nbsp;&nbsp;&nbsp; #should protect
<br>/subdir&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #but leave all other files/directory
open
<p>I've been searching the Apache doc for quite some time now but the
<br>only thing I found, which could be of some use, would be either
<br>&lt;Directory> or &lt;Location> and both seem to be valid only in the
server
<br>conf but not in .htaccess files.
<p>TIA &amp; Best regards,
<br>&nbsp;Gabriel
<p>To Unsubscribe: send mail to majordomo@FreeBSD.org
<br>with "unsubscribe freebsd-isp" in the body of the message</blockquote>

<pre>--&nbsp;
Mihai Claudiu Capatina
Wireless Network Manager &amp; Network Administrator

AIG S.A. ( <A HREF="http://www.aignet.ro">http://www.aignet.ro</A>; )

Phone : +40 95 102862 / +40 1 3102895
Fax&nbsp;&nbsp; : +40 1 3102896</pre>
&nbsp;</html>

--------------E05A6E1E5E2228DA8B20C4FF--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A2D1585.7041BA54>