Streaming live at 10am (PST)

.htaccess preventing lottie (Json file) from loading

Hey guys.

So I’ve trying to figure out why my lottie animation disappeared when I took my website online, even tho it worked perfectly when I exported my site. After trying out many different variables (disabling CDN, SSL, changing file location…) I finally realized that something in the .htaccess file is preventing loading the json file. Which brings me to my 2 following questions:

  1. When I export my sites, the lottie animation can be found in my documents folder, as a Json file. Which makes sense. But then, why is it linked to an outside copy of the script, hosted on a webflow server? Isn’t it better to load the script locally?
    The data source is linked in the following url


Renaming or even deleting the Json file from my Documents folder has no effect, so it is clear that the external script is the one being used. Not that I mind where the script is being loaded from, but it is clearly causing some issues, which brings me to my next question.

  1. When I removed my .htaccess file on my duplicate/test sub-domain, the animation appeared back again. All other settings where the same as the live site, so clearly something here is blocking this outside resource being loaded. Here is my htaccess file:

    RewriteEngine On
    RewriteRule ^index.html$ / [R=301,L]
    RewriteRule ^(.*)/index.html$ /$1/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^(.+)$ $1.html [L,QSA]

    #301 from to

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /..html\ HTTP/
    RewriteRule ^(.
    ).html$ /$1 [R=301,L]

    RewriteCond %{HTTP_HOST} !^$ [NC]
    RewriteRule ^(.*)$$1 [L,R=301]

    ErrorDocument 404 /404.html

Note: At one point, I tried changing the data=src url to /documents/Jsonfile-name, but that didn’t work and a console error showed up saying something like “access-origin” not allowed (I tried googling, didn’t really understand how to solve it).

Anyone else encoutnered this? Any idea on how to solve?


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.