Redirecting page included in report

Hello,
I am using Plausible (plausible.io/js/plausible.js). I notice the stats include the / page whereas a redirection is set on the server using .htaccess:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^$ /en/index.html [L]
</IfModule>

The website is a single page application written in vue.js and all pages are prerendered. The / route redirects to /en/index.html.
Is it normal? Do you see an explanation?
Thanks,
Mathieu

Thanks for reaching out! It’s difficult to troubleshoot it without knowing the details. Could you please share the domain name or contact us via email if you prefer that? Thanks!

Hi,
The domain is running-pace.org. To be sure that I am not generating hits from the dev server, the script tag loading plausible.js is inserted only when the website is deployed and then I have reset the stats.
Thanks for your help.
Mathieu

Thanks Mathieu. And sorry for the delay.

I just checked your site and landed on / first before it redirected me to /en/index.html. So seems like this is something to do with the way you set up that redirect. This is why Plausible counts views on / too. Please look more into that redirect setup on your home page. There are some instructions here. Thanks!

Hello,
Sorry you are right, my .htaccess was buggy. In fact I am using .htaccess file from HTML5 Boilerplate and some rules were conflicting. I have added the redirections before the rules of HTML5 Boilerplate and now it is working:

$ curl -v -L https://running-pace.org 2>&1 | egrep "^> (Host:|GET)"
> GET / HTTP/2
> Host: running-pace.org
> GET /en/index.html HTTP/2
> Host: running-pace.org

Thank you very much!
Mathieu

1 Like