I am using a copy of Piwik, which is excellent.
For paranoia additional security, I want to place Piwik's back-end in a folder that is protected by Apache basic authentication, and whose path is hidden from prying eyes.
http://example.com/protected/piwik
^----------------- .htpasswd protected
however, now the tracking code of course no longer works!
var pkBaseURL = (("https:" == document.location.protocol) ?
"https://example.com/protected/piwik/" : "example.com/protected/piwik/");
Is there a common way of placing the Piwik back-end in a separate protected directory, but allowing the tracker to work as usual?
There is a better solution: use .htaccess to selectively restrict access to Piwik files: http://forum.piwik.org/read.php?2,17251
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With