Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice