-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Astro redirects should not generate HTML stubs when using an adapter #7731
Comments
I just dropped by to create the same issue. This began appearing after a recent update of the adapter and was not present prior to that. |
Ah yep, this behavior became more noticable when #7644 was merged, but I suspect this has never worked properly in We should be bypassing these files in |
This is also relevant for the Vercel and Node adapters in hybrid mode |
Before creating a new issue: I am trying to implement redirects but its not working in prod (in dev all good): redirects: {
'/my-account/my-bookings/[hash]': '/nl/my-account/bookings/[hash]',
'/my-account/my-profile': '/nl/my-account/profile',
'/en/my-account/my-bookings/[hash]': '/my-account/bookings/[hash]',
'/en/my-account/my-profile': '/my-account/profile',
}, Everything gets redirected to Is this related to this issue? Thanks |
You can disable the stubs with |
@matthewp it looks like skipping the stubs now results in redirects being case sensitive (as is typical with redirects set directly in Netlify). Is there a workaround for this or a way to reactivate the stubs via config setting? Skipping stubs is great, but now I'm dealing with a bunch of broken links. |
I'm still seeing the "Redirecting to..." placeholders in Vercel. astro v 2.9.6, @astrojs/vercel v 3.7.4. |
When I set build.redirects = false, the redirects stop working. Vercel and SSG. |
This seems to happen on the latest Astro version. I'm using a Node adaptor and I still see the stub. |
What version of
astro
are you using?2.8.5
Are you using an SSR adapter? If so, which one?
Netlify
What package manager are you using?
npm
What operating system are you using?
MacOS
What browser are you using?
Chrome, Firefox
Describe the Bug
When using configured redirects on netlify I see the placeholder HTML with "Redirecting to: " for a moment, before the browser is redirected to the correct site.
What's the expected result?
Based on the wording in the documentation:
I assumed that the netlify adapter, would only write to the
_redirects
file, without generating these placeholder files, which give a quick flash of an unstyled page between pages.See my minimal example deployment: https://main--thriving-dusk-04bc5b.netlify.app/
Link to Minimal Reproducible Example
https://github.com/mashehu/astro-quickstart/tree/main
Participation
The text was updated successfully, but these errors were encountered: