Hi jawsmith,
thanks for your reply. You are right, first of all I should thank the PIWIK team, for their great piece of software.
Although I don’t know why you would like to block general access to “index.php”, as that would break access to the user interface of Piwik, …
Well, I actually don´t want to block it completely. My PIWIK is not yet protected by a “login attempts couter” (anti brute force protection), so I decided to protect the login area by .htpasswd .
Thanks for the provided link, but … you are wrong, if you say:
… my guess is that you are missing the concept of “regular expressions” in an Apache htaccess file.
As you probably know, the listening files can be bypassed through .htpasswd restriction with a directive like this:
<FilesMatch "^piwik.(js|php)$">
Allow from all
Satisfy any
</FilesMatch>
(btw: I renamed these files on my PIWIK for your above mentioned reasons as well.)
But the OptOut text (that should appear eg. in the disclaimer of any of my websites) are taken from a index.php request with the appropriate query string (?module=CoreAdminHome&action=optOut). Bypassing these calls through .htpasswd can neither be managed by a “Files” or “FilesMatch” directive nor by “RewriteRule”, as far as I know. I could do something like vipsoft already mentioned in this thread (http://forum.piwik.org/read.php?6,17251,page=1#msg-17301) by adding the index.php to the “FilesMatch” part and involving my IP adress to another directive, but I dont´t have a static one, so this doesn´t make any sense.
You may now understand what´s my concern and what I meant with “improper programming” - anyway, this may sounds much too hard - I should better say: when implementing the OptOut feature, programmer was a little thoughtless …
Or can you or anyone else provide a suitable solution for that problem? I´d really appreciate.
Cheers, John