Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This *should* be simple

Status
Not open for further replies.

codestorm

Programmer
Apr 11, 2001
504
AU
Hi all, another newbie here,

Given how configurable apache, etc is renowned to be, this should be a piece of cake, but as I can't find a doco on the syntax of .htaccess files, I'm stumped.

I want a directory to be password protected with .htaccess/.htpasswd. So far no problem.

However I want a subdirectory of this protected directory to be totally unprotected - without having no move it somewhere other than under the protected directory.

I'm sure it must be doable, but how?
codestorm
Fire bad. Tree pretty. - Buffy
Kludges are like lies.
You're not a complete programmer unless you know how to guess.
I hope I never consider myself an 'expert'.
<insert witticism here>
 
By default the subdirectories are all protected. I don't think there's a way to override that when you're using the .htaccess method. Wullie could confirm.

You might want to consider scripting some other type of password protection. Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
I had the same trouble..set &quot;Options&quot; to all and &quot;AllowOverride&quot; to &quot;All&quot; it'll werk then.
Hope I was of some help...
--OR--
Thanks for the help...
--Rich

 
Hi guys,

Newposter is correct.

If you do manage to get this to work, then you are likely blowing security holes into your own authentication methods.

If you have a directory that is not to be protected, then simple answer is to move it outside of the protected area.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
I'm fairly new to the Apache thing, but this has worked for us:

maindir is protected with standard .htaccess/.htpasswd stuff, while the subdir has the following as .htaccess:
--
Options +Indexes

<Limit GET POST PUT>
order allow,deny

allow from all
satisfy any
</Limit>
--

Security-wise, it is probably not the best, but it is for a very small development area on our intranet.

-Joe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top