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

404 no longer sends slug and redirects ending in / no longer work #415

Open
1 task done
disrae opened this issue Oct 4, 2024 · 0 comments
Open
1 task done

404 no longer sends slug and redirects ending in / no longer work #415

disrae opened this issue Oct 4, 2024 · 0 comments

Comments

@disrae
Copy link

disrae commented Oct 4, 2024

Astro Info

astro info
Astro                    v4.1.2
Node                     v20.10.0
System                   macOS (arm64)
Package Manager          unknown
Output                   hybrid
Adapter                  @astrojs/vercel
Integrations             @astrojs/tailwind

However, npm list shows the latest version of astro installed in the project.
npm list
[email protected] /.../404-issues
├── @astrojs/[email protected]
├── @astrojs/[email protected]
├── @astrojs/[email protected]
├── [email protected] <--- doesn't match astro info
├── [email protected]
└── [email protected]

Describe the Bug

As of late, the vercel adapter no longer passes the slug information to the 404 page, and slugs that need to be redirected that end in a '/' cause a 404 instead of being redirected.
Notice that a path of /en/ fails to redirect.

What's the expected result?

Previously, 404 pages had the slug so I could get the locale and have the correct assets and language.
Previously, redirects to pages ending in a slash were working, for example: /en/ successfully redirected to /en-ca/, but now it returns a 404.

Here is a repo with a reproduction: https://github.com/disrae/astro-404-and-redirects-errors

Link to Minimal Reproducible Example

https://astro-404-and-redirects-errors-git-main-disraes-projects.vercel.app/

Participation

  • I am willing to submit a pull request for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant