Especially when working on foreign systems/servers it might be hard to determine where the .htpasswd
file would go
if you need an access restricted area while developing the website without taking the server offline.
Here is a short PHP script on how to find it:
*Info: Save this as findHtPasswd.php
and run it on the host like https://this.host.com/findHtPasswd.php
, copy the
code and create a simple .htaccess file pointing to the correct location.