Hello friends! I see that this topic has not yet been covered in Russian. version of this resource in this format, so please connect to the issue. Required by the basic out method. protect the directory on the server, or, if possible, a specific file. As I understand it all comes down to the fact that you need to register some settings in. Htaccess. Who can help with a ready-made solution (code).
I have generated a couple login password, which I inserted into the file. In .httaccess, which lies in the root of the file, I registered the following code:
AuthName "Login" AuthUserFile /home/admin/web/mydomain.com/public_html/terminals/.htpasswd AuthGroupFile /home/admin/web/mydomain.com/public_html/terminals AuthType Basic <LIMIT GET POST> require valid-user </LIMIT> But as a result, I get an authorization request on all pages of the site, and not in a specific directory. Please help edit code