I am writing some simple HTML pages. I need to protect some pages and some files (from being downloaded) by requiring a username and password. Does anyone know a simple solution?
Asked
Active
Viewed 526 times
5
1 Answers
5
First of all find out what sort of webserver you are using by using the method suggested in this question: https://superuser.com/questions/120783/can-i-detect-what-webserver-a-website-is-using
If it's Apache How do I setup authentication on a specific folder using .htaccess?
If it's IIS https://serverfault.com/questions/193273/iis-password-protection-for-php
paulmorriss
- 15,371
- 1
- 38
- 58
-
Dear Paulmorriss, thank you very much for your great help. Is solves my problem. :-) – Anand May 10 '11 at 11:30
HTTP/1.1 200 OK Date: Tue, 10 May 2011 10:14:35 GMT Server: Apache/2.0.52 (Red Hat) X-Powered-By: PHP/4.3.9 Connection: close Content-Type: text/html; charset=UTF-8
– Anand May 10 '11 at 10:15