Solved

Password protecting a webpage

Posted on 2009-03-30
3
274 Views
Last Modified: 2013-12-12
Hi,
I would like to set up a page in Wordpress for a website.  It will sit on the server like:

http://mysite.com.au/wordpress  for example

I would like to password protect this section of the site, so if someone trys to go to this folder they will be prompted for a username and password.

I would like to know the best way to do this, and whether or not is possible to set up different usernames and passwords for different users or if I can only have one username and password?
0
Comment
Question by:Amanda Watson
3 Comments
 
LVL 29

Assisted Solution

by:QPR
QPR earned 100 total points
ID: 24025603
depends, what is the operating system on the server and how much access do you have to set folder properties?
Were this windows I would say you would remove anonymous access from the folder that contains the page(s) and create users (or a group) that will be allowed access. Turn on integrated authentication and they will be prompted for a username/password.

Otherwise if want to put the protection into your code itself then create a login page and check the values against those you have stored (in a database of text file (risky)) if they are verified then set a cookie to say logged_on = true (or something) and redirect them to the page they want to go.

On the protected page check for a cookie value (logged_on) and if not true then redirect to the login page.
0
 
LVL 35

Accepted Solution

by:
torimar earned 400 total points
ID: 24025610
Yes, it is possible to set this up with different usernames and passwords.

Use the .htaccess/.htpasswd method.

Here are introductions:
http://weavervsworld.com/docs/other/passprotect.html
http://www.html-password.net
0
 
LVL 11

Author Comment

by:Amanda Watson
ID: 24025751
Thanks for the response.
I think torimars solution of the Htpasswd Generator is what I was after.
I have also discovered that wordpress actually have some plugins for this!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Radius ASA Authentication Failed 4 63
Auto Smartport macro for Dell and HP laptops 2 55
datetime in sql 6 31
designing in object programming 12 52
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
An analysis of the phishing scam that has been affecting Google users, along with steps to take for protection, as well as what to do if you receive one of the emails.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

863 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

23 Experts available now in Live!

Get 1:1 Help Now