Solved

password protect pages

Posted on 2001-06-22
4
162 Views
Last Modified: 2010-04-09
I need to password protect some pages.
I am running RedHat Linux 7.1 and apache with php.

I tried following some info I found and got into trouble.

I was trying to use .htpasswd and .htaccess and made the entire site unviewable. Even after removing the files it remained the same. Glad I had it backed up.

What is the correct way to do this?
Not nessary to explain, but just point to the info.

I would like to know what kind of attribute this puts on so I can remove it if I ever have this problem again.




0
Comment
Question by:Ted22
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
dorward earned 100 total points
ID: 6220934
Using .htaccess and .htpasswd is the correct way to do it, and if you remove the files (remember they are hidden by default as they start with a ".") then all their effects will be undone. I don't understand how you managed to block the entire site and then be unable to release it.

I've found this tutorial on passwording to be quite good:

http://www.vortex-webdesign.com/help/pwprotect.htm
0
 

Expert Comment

by:zerotwo
ID: 6221722
Why not use an Active-X or Perlscript???
0
 
LVL 17

Expert Comment

by:dorward
ID: 6221750
Well he can't use Active-X becuause it only runs on Windows. Its a Linux server (and if you meant for the clients then that would limit the site to Internet Explorer users).

And why use Perlscript when you can have the webserver do it for you?
0
 
LVL 1

Author Comment

by:Ted22
ID: 6221954
I still don't know what happened previously, but my problem was that apache was not configured to use passwords.
First answer was the most help so I gave it the points.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now