title: React app SPA on S3 AWS while refreshing the page shows 404 page
body: <p>I have a <strong>SPA</strong> made with <strong>React JS</strong> on a <strong>S3 Bucket</strong> and I’m using <strong>Cloud Front to work through HTTPS and with a custom domain</strong>. When I refresh the page - if I have another Route that is not the BASE_URL <strong>(for example domain.com/something)</strong>, S3 sends me a 404 error.</p>
  <p>I also tried redirecting the error page to BASE_URL but it doesn’t work, it redirects me to the Http default domain that S3 provides me and again, it gives me an 404 error page.</p>
  <p><strong>I don’t know if there exists an alternative way to keep the URL without any change (domain.com/page) and avoid the 404 error the way a web server (apache) handles.</strong></p>