Si: .htaccess nella dir principale (agisce su tutte le subdir):
e crei il .htpasswd con un (da /bin/htpasswd.exe):codice:AuthUserFile "C:/apache/htdocs/.htpasswd" AuthName "Area Protetta" AuthType Basic Options -Indexes <Limit GET> require valid-user </Limit>
Poi sposti il .htpasswd creato nella dir principale, insieme al .htaccesscodice:htpasswd -c .htpasswd utente -a capo- password
Vedrai che avrai un server blindato (scegli pass buone).
Inoltre puoi anche limitare a certi IP a priori:
aggiungi nel codice del .htaccess:
così se non sei mioip1 o mioip2, non ti fa neanche accedere alla schermata x la password.codice:... Options -Indexes Order Allow,Deny Allow from mioip1 Allow from mioip2 ... <Limit GET> ...
![]()

Rispondi quotando