Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Akash187 opened this issue Mar 2, 2025 · 1 comment
Open

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

Akash187 opened this issue Mar 2, 2025 · 1 comment
Labels

Comments

@Akash187
Copy link

Akash187 commented Mar 2, 2025

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

@Akash187 Akash187 added the bug label Mar 2, 2025
@Akash187
Copy link
Author

Akash187 commented Mar 2, 2025

I don't think that the issue is with React-Router but since a lot of us use Cloudlfare pages to deploy, it will help us discuss solution or fixes at a single place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant