Redirect Multiple Slashes (//) to a Single Slash (/) Using 301 Redirect in Next.js #80095
Unanswered
alvinindra
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In some cases, users or bots may request URLs containing multiple slashes, like:
This can lead to:
To maintain clean URLs and improve SEO, we want to automatically redirect any request containing multiple consecutive slashes to the correct version with a single slash, using a 301 (permanent) redirect. And this requirement is from my team SEO.
Expeced Behavior
Request like:
should be redirected to:
Request like:
should be redirected to:
with status code 301 not 308.
Additional information
Beta Was this translation helpful? Give feedback.
All reactions