Lots of queries to matomo.php - http 307

Hello,

I use Matomo for tracking visits coming from a wordpress website.
When I include my ip adress for tracking, it seem working well: I can se my visits.

But when I try a website speed test with gtmetrix, or uptrends, I can see lots (about 20) queries to matomo.php, all with the http code 307.
Query is like this:

https://my-personal-tracker-website.org/matomo.php?action_name=Acceuil%20---%20NAME-WORDPRESS-SITE&idsite=3&rec=1&r=491516&h=18&m=42&s=16&url=https%3A%2F%2FURL-WORDPRESS-WEBSITE%2F&_id=6988949b4adb0242&_idn=1&_refts=0&send_image=0&pdf=1&qt=0&realp=0&wma=0&fla=0&java=0&ag=0&cookie=1&res=1600x900&pv_id=vPBGHl&pf_net=456&pf_srv=518&pf_tfr=19&pf_dm1=159

Does anyone has an idea to solve this behavior ?

Thanks a lot in advance.

Hi,

307 is a Temporary Redirect. Matomo should never respond with a redirect to a tracking request, so I assume this is caused by some configuration of your webserver. Maybe there is a .htaccess file in or above the Matomo directory with a rule that incorrectly redirects the request to itself.

Hi Lukas,

Thanks a lot for your answer.
Root directory was just containing an empty .htaccess
Strange, because I’ve been using Matomo for 2 or 3 years and I did not notice this.
So I put this into:

<Files "*">
        # Allow localhost IPv4
        Require ip 127.0.0.1
        # Allow HTTP API
        Require ip IP-OF-MATOMO-SERVER
        # Allow admin IP
        Require ip MY-PERSONAL-IP
</Files>

# Allow public access to basic Matomo files
<FilesMatch "(^piwik\.(php|js)|^matomo\.(php|js)|^container_.*\.js|robots\.txt|optOut.js)">
        Require all granted
</FilesMatch>

And, perhaps it’s not a good idea: as matomo.php is redirecting towards piwik.php, I remane it for saving it, and in matomo.php, I put the content of piwik.php.

Utrends, which was seeing 22 queries towards matomo server (all with 307 http code), is only seeing 2 now, and no 307. Good
But other services for testing web page are still seeing redirections (gtmetrix for example).

Do you think It could be caused by “the source” (the wordpress website) and not related to matomo server?

Well, I will going on to search. Thanks again.

Have a good day.

Hi,

You should need neither as Matomo provides both the matomo.php and the piwik.php file. And any file you modify will be overwritten on the next update.