-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Closed
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.please add a complete reproductionPlease add a complete reproduction.Please add a complete reproduction.
Description
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
14.15.5
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
N/A
Describe the Bug
- A rewritten URL containing a trailing slash will be redirected with a 308 if the
trailingSlashsetting is set tofalse. - A rewritten URL with no trailing slash will be redirected with a 308 if the
trailingSlashsetting is set totrue. - A rewritten URL with a trailing slash will not be redirected if the
trailingSlashsetting is set totrue. - A rewritten URL with no trailing slash will not be redirected if the
trailingSlashsetting is set tofalse.
Possibly related to #20984
Expected Behavior
Rewrites occur without a redirect in all of the above scenarios.
To Reproduce
Please see attached example rewrite-test.tar.gz
- Note the current
trailingSlashsetting innext.config.js. - Run
yarn dev. - Load
http://localhost:3000and click on each of the buttons, observing the presence/absence of redirects. - Shut down server and toggle the
trailingSlashsetting. - Repeat steps 1-3.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.please add a complete reproductionPlease add a complete reproduction.Please add a complete reproduction.