htaccess Login

Gordon Hudson Jun 12, 2001
Allows you to have a login box embedded in your web page for pages that normally is only available through a pop up dialogue box. Cool!
Username:

Password:

The JavaScript Source: Navigation: htaccess Login

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!

    

Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

(5 comments)

Because you need to use an .htaccess login file, as the name of the script suggests.

Lee Jan 16, 2009

It should be as shown: "www.domain.com/secure/". You would also need to [a href="http://www.javascriptkit.com/howto/htaccess3.shtml"]create the login info[/a] in an .htaccess file. For additional information, you will need to post your question on [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]the JavaScript forum[/a]. Thanks!

Lee Jan 16, 2009

Could you please explain where I put the username and password that people could use to login to this page? And can this be used to when the visitor clicks login it takes you to a separate html file that is within a hidden or secure folder?[br /][br /]I love the script and format, just looking for a little more direction to make it work! Thanks!

Kiley Jan 14, 2009

what is the the use of login html code when there is no code for register???????????

jp Nov 26, 2008

Hi, I tried your script and it did not work. You said put in the path to the folder on the server, but you did give an example. Do you mean the absolute path starting with http:// or just /folder Also, what goes in the value. It can't be that url. I am not a coder but would like a way only my friends can get to my files. Can you revise the comments?

Alexz Nov 21, 2008