Apache .htaccess how do I grant access to everyone for a single subdirectory

I read the docs but couldn't figure it out... I just want to grant access to one sub directory in an otherwise pass-word protected root. Thanks.
metalaureateAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lacrewgaCommented:
This link will give you plenty of examples... http://corz.org/serv/tricks/htaccess.php
0
netcmhCommented:
I've found just these three lines of code to bypass the authentication of the parent directory.
The .htaccess file in the subfolder should have these lines

Order Deny,Allow
Allow from all
Satisfy any

The “Allow from all” will grant access to this folder. But the line that decides that is ”Satisfy any”. The “Allow from all” gives access to anyone, this effectively neutralizes the Basic Authentication inherited from the parent folder.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
netcmhCommented:
But, please note these reasons below to not use .htaccess (copied from Apache's documentation):

There are two main reasons to avoid the use of .htaccess files.

The first of these is performance. When AllowOverride is set to allow the use of .htaccess files, Apache will look in every directory for .htaccess files. Thus, permitting .htaccess files causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.

The second consideration is one of security. You are permitting users to modify server configuration, which may result in changes over which you have no control. Carefully consider whether you want to give your users this privilege. Note also that giving users less privileges than they need will lead to additional technical support requests. Make sure you clearly tell your users what level of privileges you have given them. Specifying exactly what you have set AllowOverride to, and pointing them to the relevant documentation, will save yourself a lot of confusion later.

Note that it is completely equivalent to put a .htaccess file in a directory /www/htdocs/example containing a directive, and to put that same directive in a Directory section <Directory /www/htdocs/example> in your main server configuration:
0
metalaureateAuthor Commented:
Thanks - very helpful.
0
netcmhCommented:
Thank you for the grade. Hope it worked out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.