• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

password protect a page

R

richa

Guest
Can someone tell me how to password protect a few pages, so i can have a partial members site, so nonmembers cannot view these pages.I have seen several software programs through google,but most want to charge you and I am not sure which to use. I am using sitebuilder 4.5 and inmotion hosting. Inmotion said i can only password protect folders not pages and that i would need a cms system??? Also I am new to site building,any help would be thankful.
 
Did you ever receive an answer to this question? I'm faced with the same challenge and would love to hear how you proceeded.
 
Hi,

Its not possible. Not with the Linux version anyway. You need to sort that yourself some other way as far as I am aware.

Regards
 
I'm like you, a complete novice on this but I did find an easy PHP script on the internet. It worked for me, but don't ask me how safe it is.

So, use the script mode and add this for the text:

$user = $_SERVER['PHP_AUTH_USER'];
$pass = $_SERVER['PHP_AUTH_PW'];
if ($user != 'username' or $pass != 'password'){
header('WWW-Authenticate: Basic realm="Some text"');
header('HTTP/1.0 401 Unauthorised');
die('UNAUTHORISED ACCESS');
}



You can in this script change the 'username' and 'password' to what you want the username and password to be. You can also change the ''UNAUTHORISED ACCESS' to say whatever you wish.

Good luck!
 
I tried your script, but it didn't work. How exactly did you use it? Thx.
 
Back
Top