Report this

What is the reason for this report?

Digital Ocean Static SPA App - how to set htaccess

Posted on April 19, 2022

I want to host a SPA React app on a Digital Ocean static app, for this to be effective, I need to be able to share e.g. my-app.com/my-page

This results in a 404 error as it needs a .htaccess file to divert correctly as it will only resolve to the home page, my-app.com.

How can I add a .htaccess file that will take care of this routing?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.