The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

form to access password protected directory

Discussion in 'General Discussion' started by totalcy, Aug 29, 2007.

  1. totalcy

    totalcy Registered

    Jul 28, 2004
    Likes Received:
    Trophy Points:
    I have used cpanel to password protect directory and added one user with username and password.
    At the moment i have a link to the protected directory and when visitors click on it a popup window appears and asks for username and password. That i want to get rid off.

    I would like to have an html form with two text boxes .. one user and one pass and have a form action to take people to the protected directory. Is there a way to do this?

    i have tried the code below but it is not working

    <form name="form1" method="post" action="http://domain/protected">
    <input type="text" name="user">
    <input type="text" name="pass">
    <input type="submit" name="Submit2" value="Submit">
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Apr 7, 2006
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    The Password Protection feature uses HTTP Authentication, hence the popup. To use a form, you'll need to write a server side script (PHP, Perl, Bash, etc) that will take the form values and do the authentication.

    There is plenty of documentation on performing this. Try a Google Search. Some languages also provide ready-made modules to perform this integration for you.

Share This Page