The simplest way to password protect a page or directory, assuming you’re running Apache, is to use .htaccess and .htpasswd. I’m sure IIS and NginX have a similar feature.
Hey I know about this. Just wanna know how to put a password to a link inside of a webpage. Like when the link is clicked it will prompt to enter a password
Hi,
You cannot implement a server side password protection upon clicking a link, you could implement it client side with JavaScript but that would not be very secure as the user would only have to disable JavaScript to access the link. The password protection should trigger upon a page request (after clicking the link), and this can be implemented via htaccess as mentioned above. http://www.htaccesstools.com/articles/password-protection/