Usually, people will set basic authentication for apache directory (normally /var/www/html in centos). The reason is to protect the directory from unauthorized access. But what if a subdirectory inside (let say /var/www/html/mydirectory) needs full access? This is where .htaccess file comes into picture. To allow access to /var/www/html/mydirectory while maintaining authentication for /var/www/html, just follow below steps:
Allow from all
Satisfy Any
That's all :)