Home » Htaccess Tools » Htaccess Questions  » directory restricted but files are not
directory restricted but files are not [message #1705] Fri, 19 February 2010 22:17
pernest  is currently offline pernest
Messages: 1
Registered: February 2010
Hello

I am new to using htaccess. I have got so far with my host but now I have run into an 'interesting' problem.

I've managed to restrict a directory which contains two test files index.php and test.php. When I try to access the directory itself I'm prompted for a username and password, if I enter the correct ones then index.php loads. However if I try and access either index.php or test.php then I am allowed to without any restriction.

.htaccess is
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /web2/user7423/website/learning/testing/.htpasswd
AuthGroupFile /dev/null
require valid-user

I know that I'm not supposed to have the .htpasswd file in my web directory but I'm taking this one step at a time. I want to get it working first before I use best practice.

I am using a very restrictive package on the host easily.co.uk, basically I have ftp access and nothing else.

If anyone has any ideas they would be much appreciated.

Paul

[Updated on: Fri, 19 February 2010 22:31]

Previous Topic:New to .htaccess...going crazy
Next Topic:Redirect to a new sub dir but keep the original url.
Goto Forum:
  


Current Time: Sat Jul 31 06:43:46 CEST 2010

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software