• 0

Best method to password-protect a webpage?


Question

I am creating a staff-only webpage and I would like to protect it with a password. I've already googled and came across many methods but I'd like to get some feedback from the Neowin community.

I would prefer a free method to protect a webpage but I'm open to all suggestions.

thanks in advance!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If you're using Apache, use Apache's built in authentication. Alternatively if you have PHP installed just use sessions, it's secure because the data is stored on the server. Cookies can easily be edited as it's stored on the users browser.

But I'd suggest using Apache's built in authentication, if you're using cPanel, its easy to set it up.

Link to comment
Share on other sites

  • 0

I use this - it's nice and easy to setup and it works well for me.

Not sure how secure it is so if that's a concern you might have to look into that or see if someone else will comment. If you simply want to password protect something this is ideal.

Link to comment
Share on other sites

  • 0

Do you have a mysql database up and running?

If you do then you can create a table to store all of your usernames and passwords. Then with the login script you would search the table for a hit on both and if it succeeds you could store those values in the session. Then for all protected content you could wrap it with a conditional statement that would take the username and password stored in the session exists in your username and password table.

I doubt it's the best way but it's something that would work.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.