Forum Moderators: phranque

Message Too Old, No Replies

How to protect some pages with password

How to protect some pages with password without a CMS

         

mirozake

3:45 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



Hi everyone,

I would like to make a few pages of a strictly html/css static site accessible only by password. I noticed a dreamweaver extension for login but not sure yet. Anyone have ever done this? Any advice on the issue? I am trying to avoid porting the whole site to a CMS or using a database but maybe no way around? Please help with a little detail as I'm not that experienced. Thank you.

Miro

eelixduppy

3:48 pm on Jan 22, 2008 (gmt 0)



Hello,

You should be able to password protect a specific directory using .htaccess assuming your host provides that functionality. Look at the following google search for some explanations on how you could achieve something like this:
[google.com...]

good luck

mirozake

4:11 pm on Jan 22, 2008 (gmt 0)

10+ Year Member



Cool. To explain a little further, ideally, I want certain links to be accessbile to someone who enters a password at some point. For example, let's say price list, where we are, other animals could be three links that normal visitors don't get to view and asks for a password. If the user enters this password then he can navigate to those three links and see the content in them. So, htaccess will allow me to do this?

phranque

4:23 pm on Jan 22, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the simplest way is to put the protected pages in a directory and then protect all the contents of that directory with this .htaccess file method wherein you can specify a password file to provide access.
first access to this dir gets password auth dialog and subsequent accesses are already authorized.