How can I create .htaccess password protection firmware?
I just fiddled with setting up a password protected directory on my web server (to store hot backups, etc.) and was wondering if there was any way to create a password prompt style that pops up when a user tries access this page.
As it stands, no one will notice my cute little note, which makes me sad.
It seems like a standard .js warning, although I couldn't find a way to specify any css classes that I can change as the "alert" field is not showing in devtools, just the bahind it page:
Any advice / advice is greatly appreciated.
source to share
You cannot edit the authentication login window, it differs for each browser and is implemented as part of the browser internals (for example, the chrome code snippet related to the login name: https://code.google.com/p/chromium/codesearch# chromium / src / chrome / app / generated_resources.grd & q =% 22Authentication% 20Required% 22 & sq = package: chromium & type = cs & l = 3552 ).
What you can do is create a custom php login page (with a popover if you like):
Redirect 401 "required login page" to custom page
source to share
From how to change the style of the alert box, you cannot change the style of the alert box unless you create your own alert dialog (see here for an example)
source to share