@lambda wrote:
My simple solution:
Options FollowSymLinks SymLinksIfOwnerMatch <FilesMatch "(?<!^piwik\.js|^piwik\.php)$"> AuthType Basic AuthName "Have a nice day!" AuthUserFile /absolute_path_to/.htpasswd AuthGroupFile /dev/null Require valid-user Order Allow,Deny Allow from my_ip_or_domain Satisfy all </FilesMatch>