Hello! There is such .htaccess code:

 <FilesMatch ".(htaccess|htpasswd|ini|phps|log|txt|rtf)$"> Order Allow,Deny Deny from all Allow from 192.168.0.101 Allow from 192.168.0.100 Allow from 192.168.0.102 Allow from 93.75.31.82 Allow from 127.0.0.1 </FilesMatch> 

But as I understand the ban on IP is not a good idea. I have an Administrator user in the .htpasswd file, that is, I, and I need it to request a password under the /en/reg_auth_rec_del/ajax directory. I saw such an action with files, but not with directories. How to implement it ??

  • Why is this IP not a good idea? Although .. looking at the files - for half it is just a useless idea :) - SeVlad
  • @SeVlad Well, yes, but when there is a note in txt and rtf (well, or something like this), then it is not so useless. - Eugen Eray
  • But I never figured out how to deny access to the directory. - Eugen Eray
  • for the OS as a whole there is no difference - a file or directory. Access / prohibitions are implemented in the same way. By password - google "basic authorization". But judging by htpasswd (only here it should not be in the document), it already exists. - SeVlad

0