Solved

password protect pages

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

734 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