Solved

password protect pages

Posted on 2001-06-22
4
167 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
jQuery Dialog Autoresize Bug 2 32
Media Queries  not Firing 6 26
Table doesn't show the lines! 3 23
Table header must be on top 2 23
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 describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

740 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