Solved

password protect pages

Posted on 2001-06-22
4
170 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
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 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…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

617 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