Transitions Fails with Http 406

Behavior --> Transitions fails every time for my site

I see this POST transaction failing with a 406 not acceptable error
POST https://behunt.net/pi1226/index.php?date=today&actionType=url&actionName=http://behunt.net/&expanded=1&format=JSON&module=API&method=Transitions.getTransitionsForAction&filter_limit=-1&idSite=1&period=month

My site does use HTTPS and does have a rewrite rule in .htaccess to force transactions to HTTPS, is this the issue? If not, what else should I be looking at?

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://behunt.net/$1 [R=301,L]

Matomo ver 4.1.0

Hi,

I don’t think there is any code in Matomo that can return a 406 error.

I’d recommend you to look into your webserver error log. It should show more details on why this status code is returned.

This is resolved.

The root cause was a Mod Security rule on the server that was set by the hosting company.

The rule was failing on the use of https in this parameter actionName=https://behunt.net/

The hosting company has whitelisted it and it is working as expected now.

BTW – for anyone else seeing this and experiencing a similar issue - there was nothing in any of the server logs I had access to that indicated the cause of the error, it was only recorded in a security log visible to tech support.

Eric

1 Like