.htaccess errors after 2.15.0 upgrade - should /piwik/plugins/.htaccess exist?


#1

I started getting mysterious errors after the 2.15.0 automatic upgrade. Icons not showing up, lots of 500 Internal Server Errors.

It turns out that the culprit was a /piwik/plugins/.htaccess file.

I checked the piwik.zip, the zip does not contain a .htaccess file for this dir. So I removed the .htaccess from this dir, and everything started working properly.

So my question is, is that plugins/.htaccess file supposed to exist? How could it get there? Is it safe to remove it?

These were its contents:


# First, deny access to all files in this directory
<Files "*">
<IfModule mod_version.c>
        <IfVersion < 2.4>
                Order Deny,Allow
                Deny from All
        </IfVersion>
        <IfVersion >= 2.4>
                Require all denied
        </IfVersion>
</IfModule>
<IfModule !mod_version.c>
        <IfModule !mod_authz_core.c>
                Order Deny,Allow
                Deny from All
        </IfModule>
        <IfModule mod_authz_core.c>
                Require all denied
        </IfModule>
</IfModule>
</Files>
# Serve HTML files as text/html mime type - Note: requires mod_mime apache module!
<IfModule mod_mime.c>
   AddHandler text/html .html
   AddHandler text/html .htm
</IfModule>

# Allow to serve static files which are safe
<Files ~ "\.(gif|ico|jpg|png|svg|js|css|htm|html|swf|mp3|mp4|wav|ogg|avi|ttf)$">
<IfModule mod_version.c>
        <IfVersion < 2.4>
                Order Allow,Deny
                Allow from All
        </IfVersion>
        <IfVersion >= 2.4>
                Require all granted
        </IfVersion>
</IfModule>
<IfModule !mod_version.c>
        <IfModule !mod_authz_core.c>
                Order Allow,Deny
                Allow from All
        </IfModule>
        <IfModule mod_authz_core.c>
                Require all granted
        </IfModule>
</IfModule>
</Files>


#2

After thinking about it I guess the .htaccess is there on purpose. So what should its contents be?

Some of the error examples, URLs that can’t load with the .htaccess on:
https://domain.com/piwik/plugins/CoreHome/angularjs/notification/notification.directive.html?cb=e0e032e25d7d3fa6305f8589afe770e4
https://domain.com/piwik/index.php?date=2015-10-23&module=Referrers&action=getSearchEngines&widget=1&idSite=1&period=day

I do use CloudFlare by the way, not sure if that has anything to do with these errors.
(There had been no issues before the 2.15.0 upgrade.)


#3

I posted a message about a similar problem yesterday but later found the problem. In my root directory (piwik is a subdirectory), I had an .htaccess file that whitelisted certain file extensions. I found that the images/icons were not showing because I did not whitelist .ttf (which is the extension for the piwik font file). So I suggest looking for Rewrite Rules that may not whitelist ttf.


#4

Thanks for the tip. Unfortunately it didn’t help.
I removed the .htaccess in the parent dir (there’s only one parent .htaccess), but the problems remained.


#5

This is still a problem. Can you please confirm if the .htaccess I pasted is correct for /piwik/plugins/ ?