cancel
Showing results for 
Search instead for 
Did you mean: 

passwording a website

N/A

passwording a website

I have a site that I want to have only members access, is there a way of locking out whole directories so that only members can gain access?
3 REPLIES
N/A

RE: passwording a website

> I have a site that I want to have only members access, is there a way of locking out whole directories so that only members can gain access?

> I have a site that I want to have only members access, is there a way of locking out whole directories so that only members can gain access?

HI

you can create .htaccess, .htgroup and .htpasswd files which will keep your files secure

e.g.
lets say you have two differend folders for diferend members, PRODUCT_1 and PRODUCT_2 and so on
here is a sample .htaccess file

AuthType Basic
AuthName "Your Members Only"
AuthUserFile /home/user/your/path/.htpasswd
AuthGroupFile /home/user/your/path/.htgroup
Require group PRODUCT_1 PRODUCT_2

this will check your password and group file for access.
Its fairly simple

Also search the web for .htaccess there are some good examples on it
N/A

RE: passwording a website

> I have a site that I want to have only members access, is there a way of locking out whole directories so that only members can gain access?

I am sure the .htaccess is probably the best way to do this, however I can never get it working. You could always do it in PHP. Simply set a session variable to say if the user is loggedin or not. If they are not forward them to the login page.

That way if you wanted you could create a user profile. Give the user a little more say on the site, maybe provide different site styles, all this info can be saved into MySQL....etc

Admittedly all your files insite that directory would have to be .php files but it's another way of doing it. Just an option

------
Chris
N/A

RE: passwording a website

HI the other option you have is to load up a membership program.

cgicentral is a very good place.

send a email to alex@cgi-central.net and note in your email that peter gave you the address.
He will look after you.
He has a free membership program you can use and it is hot.
I use it to controll all my pages plus it handles all my members (nearly 2000).

Alex is very good on support and the best of it it is free