Results 1 to 10 of 10

Thread: How do I make a page password protected?
      
   

  1. #1
    GoldDraco13's Avatar
    GoldDraco13 is offline Sergeant Major
    Join Date
    Jun 2005
    Location
    Alberta, Canada
    Posts
    92

    Default How do I make a page password protected?

    How do I make a page password protected?

    For the life of me I can't seem to figure this out.


    GD13,

  2. #2
    VodaHost's Avatar
    VodaHost is offline General & Forum Administrator
    Join Date
    Mar 2005
    Location
    Wilmington, Delaware USA
    Posts
    11,428

    Default


    VodaHost

    Your Website People!
    1-302-283-3777 North America / International
    07031847328 / United Kingdom

    ------------------------

    Top 3 Best Sellers

    Web Hosting - Unlimited disk space & bandwidth.

    Reseller Hosting - Start your own web hosting business.

    Search Engine & Directory Submission - 300 directories + (Google,Yahoo,Bing)



  3. #3
    christobal's Avatar
    christobal is offline First Sergeant
    Join Date
    Jun 2005
    Location
    Israel
    Posts
    73

    Default password protect single page

    Quote Originally Posted by GoldDraco13
    How do I make a page password protected?

    For the life of me I can't seem to figure this out.


    GD13,
    Try this script User name = mike ,password=4444 ---The page must be named with .php extension to work
    Remove // from each line but leave the lines marked ////

    //<?PHP
    //if(!isset($PHP_AUTH_USER))
    //{
    //Header("WWW-Authenticate: Basic realm=\"Members Only\"");
    //Header("HTTP/1.0 401 Unauthorized");
    //echo "<h1>Authorization Required.</h1>This server could not verify that you are authorized to access the document requested. Either you //supplied the wrong credentials (e.g., bad password), or your browser doesn t understand how to supply the credentials required.\n";
    //exit;
    //}
    //else
    //{
    //$user_pass = array (
    ////add an unlimited username and password below
    ////EX: "new_user" => "new_pass", "joe" => "333",
    //"mike" => "4444",
    //"aaa@aaa.com" => "pass"/*this must be the last one*/
    //);
    //if (($PHP_AUTH_USER == "") || ($PHP_AUTH_PW == ""))
    //{
    //header('WWW-Authenticate: Basic realm="Members Only"');
    //Header("HTTP/1.0 401 Unauthorized");
    //echo "<h1>Authorization Required.</h1>This server could not verify that you are authorized to access the document requested. Either you //supplied the wrong credentials (e.g., bad password), or your browser doesn t understand how to supply the credentials required.";
    //exit;
    //}
    //else if (strcmp($user_pass[$PHP_AUTH_USER],$PHP_AUTH_PW) == 0)
    //{
    //echo "Logged in";
    //?>

    ////Now the page to protected
    ////<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    //<html>
    //<head>
    //<title>Untitled</title>
    //</head>
    //<body>
    //Hello
    //</body>
    //</html>
    ////End the page to protected
    ////Put this code at the end of the page
    //<?
    //exit;
    //}
    //else
    //{
    //header('WWW-Authenticate: Basic realm="Members Only"');
    //Header("HTTP/1.0 401 Unauthorized");
    //echo "<h1>Authorization Required.</h1>This server could not verify that you are authorized to access the document requested. Either you //supplied the wrong credentials (e.g., bad password), or your browser doesn t understand how to supply the credentials required."; exit;
    //}
    //}
    //?>

  4. #4
    GoldDraco13's Avatar
    GoldDraco13 is offline Sergeant Major
    Join Date
    Jun 2005
    Location
    Alberta, Canada
    Posts
    92

    Default

    Thanks, ***** that link just goes to main page, still don't see where the tutorial is but thats ok cause I figured it out, and alot easyier then adding a script.

    Heres what you do for those that run into this problem as well.

    Goto your control panel and into your file manager, add a folder to your public_html and name it whatever(for this example we'll name it admin)

    Now that we have the new folder in the public_html folder named admin, exit file manager and go into password protect directories and locate the new admin folder on the menu given, which should be in public_html by default.

    Select the folder and edit the properties and add the info for username and password.

    Once this is done you can start making pages like normal and upload them to this new folder by changing the path to public_html/admin when publishing your page. Make sure to change this back when publishing other pages not meant for that directory. The publishing menu box remembers what was last enetered.

    Thanks again for your help, and I hope this clears it up for anyone else that runs into this problem.

    GD13,

  5. #5
    reichiliu is offline Corporal
    Join Date
    Sep 2005
    Posts
    11

    Default

    Quote Originally Posted by GoldDraco13
    Thanks, ***** that link just goes to main page, still don't see where the tutorial is but thats ok cause I figured it out, and alot easyier then adding a script.

    Heres what you do for those that run into this problem as well.

    Goto your control panel and into your file manager, add a folder to your public_html and name it whatever(for this example we'll name it admin)

    Now that we have the new folder in the public_html folder named admin, exit file manager and go into password protect directories and locate the new admin folder on the menu given, which should be in public_html by default.

    Select the folder and edit the properties and add the info for username and password.

    Once this is done you can start making pages like normal and upload them to this new folder by changing the path to public_html/admin when publishing your page. Make sure to change this back when publishing other pages not meant for that directory. The publishing menu box remembers what was last enetered.

    Thanks again for your help, and I hope this clears it up for anyone else that runs into this problem.

    GD13,
    Thanx GD13! That was real helpful! ^_^

  6. #6
    reichiliu is offline Corporal
    Join Date
    Sep 2005
    Posts
    11

    Default

    I've successfully created and published a password protected page (called www.aalrrhome.com/membersonly_home). However, when I tried to login from my index site (www.aalrrhome.com) and got directed to the www.aalrrhome.com/membersonly_home page, I get that message "the page cannot be found", despite the fact that I was able to publish the page. Does anyone know what could be the problem?

  7. #7
    sparrow's Avatar
    sparrow is offline Master Sergeant
    Join Date
    Oct 2005
    Posts
    65

    Question And the next step is? I am in suspense... lol

    Quote Originally Posted by GoldDraco13
    Thanks, ***** that link just goes to main page, still don't see where the tutorial is but thats ok cause I figured it out, and alot easyier then adding a script.

    Heres what you do for those that run into this problem as well.

    Goto your control panel and into your file manager, add a folder to your public_html and name it whatever(for this example we'll name it admin)

    Now that we have the new folder in the public_html folder named admin, exit file manager and go into password protect directories and locate the new admin folder on the menu given, which should be in public_html by default.

    Select the folder and edit the properties and add the info for username and password.

    Once this is done you can start making pages like normal and upload them to this new folder by changing the path to public_html/admin when publishing your page. Make sure to change this back when publishing other pages not meant for that directory. The publishing menu box remembers what was last enetered.

    Thanks again for your help, and I hope this clears it up for anyone else that runs into this problem.

    GD13,
    Hi there,
    Great instructions! I printed them and about to try but of course my mind is jumping to next question (probably answered very easily).
    After I do this, when I create my page does it have to contain a login form on that page? Also does everyone have the same password to that page? (Does the page only have one password)
    If I want to have a monthly fee for access to that page how would I prevent non payers from accessing it?
    I have seen the scripts but I am like whoa nellie, blow my mind.....I am such a simpleton.... lol

    sparrow

  8. #8
    sparrow's Avatar
    sparrow is offline Master Sergeant
    Join Date
    Oct 2005
    Posts
    65

    Default

    way to cool! Just watched tutorial. Answered questions. I'm dancin! I'm dancin! lalalalalalala

  9. #9
    bängel's Avatar
    bängel is offline Corporal
    Join Date
    Nov 2007
    Location
    Uppsala, Sweden
    Posts
    10

    Question Re: How do I make a page password protected?

    Quote Originally Posted by reichiliu View Post
    I've successfully created and published a password protected page (called www.aalrrhome.com/membersonly_home). However, when I tried to login from my index site (www.aalrrhome.com) and got directed to the www.aalrrhome.com/membersonly_home page, I get that message "the page cannot be found", despite the fact that I was able to publish the page. Does anyone know what could be the problem?
    I have the exact same problem. I guess I should link in another way, but how?

  10. #10
    CarbonTerry's Avatar
    CarbonTerry is offline Major General
    Join Date
    Oct 2005
    Location
    St L MO
    Posts
    2,590

    Default Re: How do I make a page password protected?

    www.aalrrhome.com/membersonly/_home
    Instead of naming this page "_home" you can name it "index"
    Then the link would be:
    www.aalrrhome.com/membersonly

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. How to create a registration page?
    By apoorvasheth in forum Microsoft Products
    Replies: 3
    Last Post: 10-05-2006, 08:10 AM
  2. How to create a registration page?
    By apoorvasheth in forum mySQL & PHP
    Replies: 6
    Last Post: 04-02-2006, 02:57 PM
  3. How to create a registration page?
    By apoorvasheth in forum mySQL & PHP
    Replies: 2
    Last Post: 10-14-2005, 11:21 AM
  4. paypal & pdf password protected file.
    By jem in forum BlueVoda - General Issues
    Replies: 1
    Last Post: 10-08-2005, 12:29 AM
  5. paypal & pdf password protected file.
    By jem in forum The Voda Lounge (Chit Chat)
    Replies: 3
    Last Post: 09-29-2005, 11:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49