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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.0, .htaccess and folder indexes

Status
Not open for further replies.

Anumet

Technical User
Jun 25, 2004
13
NO
One of the sysadmins on my server recently upgraded to Apache 2.0, which gave me an odd problem with my .htaccess password protected folders. (Everything worked fine till the upgrade.)

In htdocs/MyFolder there is an index.html, but no .htaccess file, since the main directory is open to all.

In htdocs/MyFolder/MySecretFolder - there is no index.html since I want ppl to be able to get the files without me updating a webpage - but there is a .htaccess file since I want it to be restricted.

After Apache 2.0 was installed, I was only given the "Forbidden - You don't have permission to access /MyFolder/MySecretFolder on this server." message when logging into MySecretFolder.

If I add an index.html to MySecretFolder - it will show it just fine.
If I add a
Options +Indexes
to the .htaccess file inside MySecretFolder - the folder index of MySecretFolder will be shown just fine BUT by putting "Options +Indexes" in the MySecretFolder .htaccess - the MyFolder folder will get the "Forbidden - You don't have permission to access /Myfolder on this server." message.
I.E. clicking a link to will get you directly to the forbidden message.
However, if you add index.html to the link, it works just fine (i.e. ).

The chmod settings are the same for the two directories, and as mentioned - this worked flawlessly on an earlier version of Apache.

Why is the .htaccess of a subfolder influencing my main folder? How do I fix it?

Thanks!

-Anumet
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top