Index.html as Root Object for SPA

I am trying to upload a Single Page Application to R2. The SPA works when i access the index.html directly but when i access the routes like “my.domain.com.br/route” i get a 404.

In other solutions like S3 this configuration is called “Object Root” but i did not see any configuration to do that in R2.

How can i do that in R2?

You can try a Transform Rule.

e.g. something like concat(http.request.uri.path, "index.html") and the following match:

2 Likes

Thanks!!! Worked very welll!!!

1 Like

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