php - Put a login on top of my web space to prevent access to my subfolders
one text
I have this kind of issue, i bought this web domain for developing purposes, as a demo area in which i can develop websites for clients. I have multiple installation of wordpress: public_html -- website1 folder -- wordpress installation -- website2 folder -- wordpress installation -- website3 folder -- wordpress installation ecc.
I'd like to have a popup window as this one:enter image description here
so i can prevent people to access my demos in dev websites. I need that everyone that tries to enter in one of my wp sites or subfolders of web space, goes redirected to the login popup / the login popup shows up before they can access the content.
Searching online i've wrote an authentication on a index.php file at the beginning of the root folder, but i need it on every path in the web server space, i'm pretty shure i have to rewrite the .htaccess file but i can't figure out how.
thank you for your time.
Source