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?
-
1What sort of webserver are you using? Apache? IIS?– paulmorrissCommented May 10, 2011 at 9:20
-
I don't know actually. I can connect to the server to upload my files there. Besides that, I don't think that I could have other access to the server. Thank you!– AnandCommented May 10, 2011 at 9:28
-
Do you want to use Netcraft as suggested in this question superuser.com/questions/120783/… to work it out and then tell us the results.– paulmorrissCommented May 10, 2011 at 10:10
-
Here is the result: Thank you! 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– AnandCommented May 10, 2011 at 10:15
-
To make this question useful to other people I've answered it for people using IIS too.– paulmorrissCommented May 10, 2011 at 10:37
Add a comment
|
1 Answer
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
-
Dear Paulmorriss, thank you very much for your great help. Is solves my problem. :-)– AnandCommented May 10, 2011 at 11:30