Page 1 of 1

.htaccess

PostPosted: 10. July 2008 04:44
by myriad360
I have an htaccess in a dir, but a sub dir of that I want to leave open to anyone. Is there a way to do that? Preferably without going into the http.conf or server files.

Thanks!

Colbs

PostPosted: 10. July 2008 06:39
by Milligan

PostPosted: 10. July 2008 11:22
by Nobbie
Milligan wrote:Try this:


Dont try it - <Directory> is not allowed in .htaccess

Instead create .htaccess in C:/xampp/htdocs/mydirectory as well in C:/xampp/htdocs/mydirectory/mysubdirectory and supply the order-clause separately:

C:/xampp/htdocs/mydirectory/.htaccess:

Code: Select all
order deny,allow
deny from all


Attention: there *must not* be any space between "deny,allow".

C:/xampp/htdocs/mydirectory/mysubdirectory/.htaccess:

Code: Select all
order allow,deny
allow from all

PostPosted: 12. July 2008 17:36
by myriad360
Thanks guys. I can appreciate the Directory application in the http.conf, I need to move to it eventually. I have a problem with the idea of the clear text UN/PW exhange with .htaccess . But I will get there eventually.

I tried the second application, but it did not work for the subdirectory. I should mention that the main directory already has an .htaccess that allows for certain users, and does not deny everyone. Is there a way to allow the mydirectory to have certain users, and then the mysubdirectory to be completely open?

Thanks!