-
Notifications
You must be signed in to change notification settings - Fork 27.5k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
redirect destination to lowercase #25586
Comments
I've tried the following workaround, but it does not work properly nor in a consistent fashion between Also is does not return a proper On
Then on
Note that I did see your notice below in the docs, but I am not sure is applicable in this case. And, in any case, the redirection in
The bottom line though is, as said that this does not really solve the issue:
|
Any news on this one? I am about ready to deploy the app in production, but cannot afford to loose the search engines on this. |
This is not a bug in next.js. I'll convert this into a help discussion. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
14.15.4
What browser are you using?
Firefox
What operating system are you using?
macOS
How are you deploying your application?
in development
Describe the Bug
Attempting to use
next.config
to redirect uppercase routes to lowercase ones.While it seems to be simple enough to catch the concerned routes in
source
, that's not the case when it comes to modifying the route indestination
.I have a number of legacy routes that need to be redirected as follows:
Legacy is Apache and today those redirections are handled with .htaccess
So I was expecting to achieve that with something like:
But
next.config
does not like that and throws an error.Looking around your issues I found this one or this one #21498, but I am not sure a resolution exists.
One of the above issues includes a code similar to below as a workaround, but this is not really satisfactory, as it first sends the user to
404
.Importantly, this also does not address the issue of SEO, which would require a code HTTP
301
.Expected Behavior
To Reproduce
see code above
The text was updated successfully, but these errors were encountered: