Page 1 of 1

How do i protect a folder

PostPosted: 17. March 2011 03:30
by Kyle-Begin
kk the Folder i want to protect is in C:\xampp\htdocs\admin

the folder i want to protect is the admin folder i've tryed the .htpasswd and the .htaccess but they dont work for me is there other way or give me a link to a tut Thank you

Re: How do i protect a folder

PostPosted: 17. March 2011 03:45
by Sharley
Are you still using XAMPP 1.7.3 version?

Any clues in the C:\xampp\apache\logs\error.log file why your .htaccess does not work - good details will be given in this log file that will explain why the dot files are not working?

Did you delete the index.php and the index.html files that belong to the XAMPP installation before adding your own index files and associated folders?

Please remember that we can't see what you see on your PC and so we rely on you providing explicit details of how and why you are having issues.



The .htaccess .htpasswd (dot files) method should work but not knowing how you did that to get the negative results makes it difficult to help you correct it.

This method produces a user/pass requirement to access the folder admin and requires you use the htpasswd.exe file found in the C:\xampp\apache\bin folder - you will need to open a command prompt in this folder so type cmd.exe in the start>Run... text box then type cd C:\xampp\apache\bin


There are online generators that will also do this job for you but some will not produce files suitable for Windows Apache as the default is for Linux flavours plus you may be able to search and find freeware software tools to do this also - hotscripts.com comes to mind.

Let me know back the details of how you created the above combo and where you placed the dot files so I may be able to help you password protect your admin folder.