You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Astro v4.15.12
Node v22.7.0
System Windows (x64)
Package Manager unknown
Output hybrid
Adapter @astrojs/cloudflare
Integrations @astrojs/sitemap
@astrojs/tailwind
astro-icon
Describe the Bug
Below, I have it set up to redirect from /foo or /foo/ to /bar.
However, when I build this with the Cloudflare adapter, the trailing slash is removed in the _redirects file, and accessing /foo/ results in a 404.
Having the same issue.
My workaround: Create a custom _redirects file in /public directory with correct redirects.
But indeed, a built-in solution would be nicer here.
@ astro team: Do you agree? Would you accept a PR for that?
Astro Info
Describe the Bug
Below, I have it set up to redirect from
/foo
or/foo/
to/bar
.However, when I build this with the Cloudflare adapter, the trailing slash is removed in the
_redirects
file, and accessing/foo/
results in a 404.What's the expected result?
The trailing slash has not been removed from the
_redirects
file, so it is expected that accessing/foo/
will result in a successful redirect.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-fzcdgt?file=dist%2F_redirects
Participation
The text was updated successfully, but these errors were encountered: