Solved

Password protecting a webpage

Posted on 2009-03-30
3
273 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
This article discusses four methods for overlaying images in a container on a web page
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 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

17 Experts available now in Live!

Get 1:1 Help Now