Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clarification on .htaccess

Status
Not open for further replies.

gbraden

MIS
Jan 24, 2002
129
US
Website access. I have a customer who wants to have part of his website opened only to registered users. I see a lot of websites doing this, but I am wondering if this is more than simply setting up .htaccess. We will be using Apache 1.3 on a Linux machine with PHP and MySQL.

Thanks in advance





[noevil]
Glen Braden
 
Hi

Glen said:
I see a lot of websites doing this, but I am wondering if this is more than simply setting up .htaccess.
Well, depends on what kind of authentication you want. For HTTP Authentication, both Basic and Digest, is enough .htaccess and the password file.

But I am not sure if that is what your customer is thinking to.

Feherke.
 
I reworded the question and posted over at PHP. There is a method called Sessions that restrict access if you cannot provide login/password.

I was looking for a way that a registered user could access more content than one who is not registered. Similar to websites that allow you to read part of an article, but only makes the entire article available to registered users.



[noevil]
Glen Braden
 
Ill tell you what, I have a Visual Quick Start guide for PHP and it has lots of examples, including a user authetication system.

However, my main script language is perl... I do all the coding, and store all important info like passwords in a text file. I then secure just the text file with .htaccess... Everything else that needs securing I do with hidden fields, to consistantly check that the username and password they user logged in with is correct, every time they load a page.
 
Well, no hehe. When the user logs in the first time, when they click login, a hidden field carries the username and password, so once in the admin area, if they click on another button i check if the username and password carried by the hidden field is the same as in the file storing it. This method I devised myself, because I couldn't find anything at the time which told me how to write a proper user login system
 
They aren't even encrypted. I don't get why they need to be??? The correct username and password is stored in a text file which is highly secured using htaccess, no one can view the correct username an dpassword
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top