[Error] Failed to load resource: the server responded with a status of 403 (HTTP/2.0 403) (piwik.php, line 0)

This is my third installation of Piwik, but the first time that I’m having trouble. On my new WordPress website (based on a personal theme) I’m getting the following error

[Error] Failed to load resource: the server responded with a status of 403 (HTTP/2.0 403) (piwik.php, line 0)

followed by an enormously long URL.

Here’s the URL. Please note that I’ve exchanged my domain with example.com:

https://stats.example.com/piwik.php?action_name=example.com –%20Startseite&idsite=1&rec=1&r=804481&h=18&m=50&s=54&url=https%3A%2F%2Fexample.com%2F&_id=baa6f6c560894237&_idts=1488036205&_idvc=1&_idn=0&_refts=0&_viewts=1488036205&send_image=1&pdf=1&qt=0&realp=0&wma=0&dir=0&fla=0&java=1&gears=0&ag=0&cookie=1&res=1920x1080&gt_ms=1266&pv_id=3ivjp3

This error is returned on the home page (Startseite in german). On the other pages, this is replaced by the name of that page.

I did contact my hoster because I read something about mod_security, but the hoster says that everything is ok there and the site is correctly whitelisted. They have no idea why this happens and I do neither.

Hopefully anyone of you can uncover this mystery. Thanks in advance for any help!

PS: Running on Piwik 3.0.1, MySQL 5.6.35 and PHP 5.6.30

Solved

It was a problem with the .htaccess file. Wordpress is installed in the root directory and there is a /stats subdirectory, in which Piwik is installed. In Wordpress I have some plugins for security which do start the rewrite engine, but don’t stop it. So to solve this error, I made another .htaccess file, which I put inside the /stats directory. in that .htaccess-file I’m only stopping the rewrite engine. Now it all works perfectly again.

1 Like