Forum Moderators: coopster

Message Too Old, No Replies

One Password

         

hexdj

11:27 pm on Dec 27, 2005 (gmt 0)

10+ Year Member



I need to figure out how to set a password on my home page so people cannot view any of the contents unless they're logged in. I don't need everyone to have a password but just have one for everyone and every now and then I can change that pass manually.

Is this possible with PHP or even ASP (I would prefer the latter).

Thanks!

henry0

11:53 pm on Dec 27, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you need only one pass word
Then Google for:
.htaccess password protect page

Remember before htcasss is a "dot".
You will find many tutorial and samples

NB
Since your users will need to enter a PW I will rather go for a real authentication script that will offer many more admin control.

NB_2
To check your .htaccess on your server
when using FTP
type in an empty little square (right hand options)
-la and hit enter.

hexdj

5:19 am on Jan 25, 2006 (gmt 0)

10+ Year Member



What do u mean empty square?

DrDoc

6:17 am on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



empty square = if you are using WS_FTP, there's a square (input field) next to the listing

What henry0 is talking about is ensuring that all files (including otherwise "hidden" files) are displayed. In order to do this, you need to make sure that the file list command also gets passed with an "-la" argument. How and where to set this varies from one FTP client to the other.

This all, of course, also assumes that you are using a Linux server which runs Apache ...