Exclude piwik.js and piwik.php from ssl redirect

I am using apache2 on ubuntu server. I have configured all traffic to redirect to ssl. I’m using letsencrypt.org for ssl certs and it help setup the redirects. I need to exclude two file from that ssl redirect.
/piwik.js
/piwik.php - this one will likely have query string args as well

Here are the contents of my conf-available/ssl-only.conf file…

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule .* https://%{HTTP_HOST}/%{REQUEST_URI} [R=301,L,QSA]

What do I need to change here to exclude these two file from being redirected to ssl?
Thanks,
Rob A

You are posting to the wrong forum. This is a mod_rewrite question and should be directed at a forum that can help with that.

I realize this is an apache mod_rewrite question. I thought it would be relevant here, as most piwik users who implement ssl would need to deal with this. Regardless, I figured it out, so nevermind.
Cheers,
-Rob A

I think the correct rule would be:

RewriteCond %{HTTPS} !=on [NC]
RewriteCond %{REQUEST_URI} !^/piwik\.(php|js) [NC]
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Btw. an excellent source for htaccess is: Htaccess - THE Ultimate .htaccess tutorial with 100's of Examples and an excellent tester for your htaccess: http://htaccess.madewithlove.be/