LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 07-07-2005, 05:18 AM   #1
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Rep: Reputation: 30
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
 
Old 07-07-2005, 07:12 AM   #2
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: ubuntu
Posts: 2,530

Rep: Reputation: 108Reputation: 108
Check out Apache's FAQ:
http://httpd.apache.org/docs/misc/FA...authentication
 
Old 07-07-2005, 07:48 AM   #3
64bitprocessor
LQ Newbie
 
Registered: Jul 2005
Location: Bangalore
Distribution: Debian
Posts: 15

Rep: Reputation: 0
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.

Last edited by 64bitprocessor; 07-07-2005 at 07:50 AM.
 
Old 07-07-2005, 07:58 AM   #4
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Distribution: RH,FC/SuSE/Debian/HPUX/OSX
Posts: 511

Rep: Reputation: 30
e.g. keyword:
htaccess
 
Old 07-07-2005, 08:49 AM   #5
J_K9
Member
 
Registered: Nov 2004
Distribution: Slackware 11, Ubuntu 6.06 LTS
Posts: 700

Original Poster
Rep: Reputation: 30
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
 
Old 07-07-2005, 09:12 AM   #6
xushi
Senior Member
 
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Can I password protect a sub-directory of a hosted website from client PC mark001 Linux - Newbie 18 11-12-2004 03:29 PM
how to password protect certain directories? sirpelidor Linux - Security 3 10-06-2004 01:16 PM
how do I poassword protect a directory on a website, Apache bentman78 Linux - Software 8 06-17-2004 12:12 PM
how to protect images linking from other website adrianmak Linux - Software 9 10-19-2003 08:43 AM
Password protect souvik Programming 0 05-22-2001 06:28 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration