Password protection complete site

Gravatar Heronation

  • Posts: 2
  • Topic Created: Wed Mar 14 13:12:07 2012 +0100
  • Topic Updated: Wed Mar 14 13:13:14 2012 +0100

Hello community,

I want to set up an little travel blog for a friend of mine. He wants to protect the complete site with a password. Because I don't want to use .htaccess method, I'm looking for a solution with php. I tried surround the index.php with my own code: See attached file.

Attachments

Gravatar jack

Hey, if you set the permissions view site to only allow registered users then I think that would accomplish what you want.

Gravatar Heronation

I don't want to have registered users. I just want to have one password, which I can give around.

Gravatar jack

ahh, okay. I think the easiest thing to do would be to contact your host, they often have a password lock option.

Gravatar Heronation

They would direct me the Confixx password lock option, which does nothing more than creating a .htaccess...

With the attached .php file i tried to use the chyrp session and create a password login before displaying the chyrp site.

Gravatar lorenzbi

You could also make a registered user and give that password around then block access to the control panel (password changing etc) with htaccess and only allow your ip...

Gravatar ParadisoShlee

Id argue the best option would be a single user account with group access to view the page. If you want classic HTACCESS restrictions, that's pretty easy too.