Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

password protect pages

Posted on 2001-06-22
4
Medium Priority
?
173 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 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

670 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