generated from amazon-archives/__template_Apache-2.0
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 101
Closed
Labels
hostingIssue related to Amplify HostingIssue related to Amplify Hostingpending-responseIssue is pending response from authorIssue is pending response from authorpending-triageIncoming issues that need categorizationIncoming issues that need categorization
Description
Environment information
N/A
Describe the bug
I encountered an issue with the configuration of rewrites and redirects in my single-page application (SPA). Despite following the documentation, the routes are not handled correctly, leading to a 404 error when directly accessing any URL other than the root. The app is using React Router, and it should handle all routes client-side, but the server is not redirecting requests properly to the index.html file as expected.
This is how the project routes are configured

Reproduction steps
and this is the configuration that must be done according to the documentation
 .
.
Framework: React
Router: React Router v6.22.2
Hosting: AWS Amplify
Build Tool: Vite v5.0.8
Node.js Version:  20.11.1
Operating System: Windows
Metadata
Metadata
Assignees
Labels
hostingIssue related to Amplify HostingIssue related to Amplify Hostingpending-responseIssue is pending response from authorIssue is pending response from authorpending-triageIncoming issues that need categorizationIncoming issues that need categorization