Date: Tue, 5 Dec 2000 11:13:30 -0500 From: "Jim Weeks" <jim@siteplus.net> To: <freebsd-isp@FreeBSD.ORG> Subject: htaccess only protecting one specific subdir? Message-ID: <006501c05ed6$501a7f60$333d2426@siteplus.net>
next in thread | raw e-mail | index | archive | help
----- Original Message ----- From: "Jim Weeks" <jim@siteplus.net> To: "Gabriel Ambuehl" <gabriel_ambuehl@buz.ch> Sent: Tuesday, December 05, 2000 11:11 AM Subject: Re: htaccess only protecting one specific subdir? > Gabriel Ambuehl dispersed into the ether > > > 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 never actually had an occasion to this, but it seems to be easy stuff. > The answer is in the Limit directive. The .htaccess file in the main > directory is overridden by placing another .htaccess in the subdirectory. > Simply remove the GET form the Limit directive in the subdirectory .htaccess > file. In fact I believe you could just put <Limit > by itself. I will > leave it up to you to experiment. > > AuthUserFile /usr/home/simpsons/.htpasswd > AuthGroupFile /dev/null > AuthName ByPassword > AuthType Basic > <Limit GET POST> > require valid-user > </Limit> > > Hope this helps, > > Jim > ________________________________________________________ 1stUp.com - Free the Web Get your free Internet access at http://www.1stUp.com 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?006501c05ed6$501a7f60$333d2426>