Skip to content

Cloudflare Pages don't support _redirects to __spa-fallback.html #13145

@Akash187

Description

@Akash187

I'm using React Router as a...

framework

Reproduction

  1. Create a SPA app with pre-rendered / path.
  2. Use wrangler to serve the buid/client using wrangler pages dev ./build/client

System Info

1. React Router v7.2.0
2. Vite 6.2.0
3. React 19.0.0
4. Wrangler 3.111.0

Used Package Manager

pnpm

Expected Behavior

_redirects rule /* /__spa-fallback.html 200 should serve with status 200.

I tested my build using sirv-cli and it is working fine. The issue is only with cloudflare pages, during development using their wrangler tool and on server when deployed.

Actual Behavior

Right now this rule is creating 308 permanent redirect issue.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions