LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Password protect a website (https://www.linuxquestions.org/questions/programming-9/password-protect-a-website-340866/)

J_K9 07-07-2005 04:18 AM

Password protect a website
 
Hi,

I was just wondering: some websites have a feature where the index.html includes a kind of member login with username and password, so that only the developers of the website can view it (prior to release). I'm not sure how I could make this, so could someone please point me in the right direction?

What I actually want to do is create an index.html which simply contains a script which is a member login form, and if the username and password are correct, they could then be redirected to the real site index. Thanks, and once again, any help would be appreciated! ;)

J_K9

Hko 07-07-2005 06:12 AM

Check out Apache's FAQ:
http://httpd.apache.org/docs/misc/FA...authentication

64bitprocessor 07-07-2005 06:48 AM

Hi,
The login screen is not a feature of HTML or other scripts. Authentication for the web pages is provided by the web server. Try to get some information about the Apache web server configuration.

overlord73 07-07-2005 06:58 AM

e.g. keyword:
htaccess

J_K9 07-07-2005 07:49 AM

Cool, many thanks to all of you for replying, but it's going to go on a free web hosting company which doesn't use Apache, _and_ the webhosting is free which means that they don't provide any nice tools like Yahoo does. I've been given a PHP script by a guy on AO, so I'm trying to get that to work. It is quite crude as all it does is verify whether the password inputted is the same as the one in the code, but I'm hoping (fingers-crossed!) that it'll work. Thanks for your help!

J_K9

xushi 07-07-2005 08:12 AM

That should work. And the advantage of using PHP over plain HTML is that no one can see the source code.


All times are GMT -5. The time now is 08:55 PM.