Author Topic: Does anyone know the best way to password protect website  (Read 1329 times)

jayjota

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1402
Does anyone know the best way to password protect website
« on: March 10, 2009, 06:42:01 PM »
Hello, I am wondering if anyone knows of a different way to password protect a website.
Currently, I used cpanel to password protect the directory that my phpmotion site is at, only problem is that it asks for the password twice, sometimes 3 times, and this website is for internal use only for a few select people. Perhaps there is a better way to set-up a password-protect gateway ? Let me know if you know of any other way. I would really appreciate this. thanks.

den48248

  • Guest
Re: Does anyone know the best way to password protect website
« Reply #1 on: March 11, 2009, 04:45:36 AM »
Could do it with PHP, where you check the password against a variable, and if it's right you create a session which is checked on each page.

Or you could use htaccess

http://tools.dynamicdrive.com/password/

oac

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2344
Re: Does anyone know the best way to password protect website
« Reply #2 on: March 11, 2009, 04:50:48 AM »
.htaccess is how cpanel does it already I think. Otherwise like den48248 said, PHP/Mysql would work. If you don't want to code it I'm sure there's some free scripts out there which do the job fine.

reesy

  • Full Member
  • ***
  • Posts: 447
Re: Does anyone know the best way to password protect website
« Reply #3 on: March 11, 2009, 08:52:22 AM »
Yea the cpanel thing, just creates the .htacess for you.
You prob have to sign twice because www.domain.com and domain.com are different. If you give them the right type of url, then you should only have to sign in once.

sbcjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6247
    • PHPmotion Mods

jayjota

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1402
Re: Does anyone know the best way to password protect website
« Reply #5 on: March 11, 2009, 11:03:01 AM »
Yes, It is the .htaccess, the problem arises when loading index.php as it pulls 2 different pages, the inner_index.htm and main_1.htm , thats why its asking for it twice....

sbcjr> thanks! I am going through this right now....

bootmaker

  • Guest
Re: Does anyone know the best way to password protect website
« Reply #6 on: March 11, 2009, 02:14:31 PM »
I use cpanel and change names of directories. If that helps you. I don't mind tripple protection

oac

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2344
Re: Does anyone know the best way to password protect website
« Reply #7 on: March 12, 2009, 03:59:08 AM »
Yeah, Vimhost is right. The templates wouldn't cause the problem as they are processed on the server.