-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Link is truncated in the middle #52381
Comments
Please checkout this: https://nextjs.org/docs/pages/api-reference/next-config-js/redirects |
Im experiencing the exact same issue. Im not using any redirects, i do have output:'export' set to true and any links I use get truncated and 404. I previously had the .txt issue (im using the latest nextjs) so ive set prefect={false} in order to avoid that. Currently I cant get any links to work at all when published as a static website does anyone have any work arounds? thanks |
Did you checkout link above |
the link above doesnt help? its just to the docs regarding redirects, the issue i have is with a simple link, the url is truncated, i dont have redirects enabled |
Sorry for misunderstanding could give some examples of truncated urls please ? |
no problem, so an example link in my code is Locall this works in debug, when i publish as a static site this will redirect to likewise this link
navigates to however, if i navigate to the correct url by typing in the address ie go to I see the page, and all the links now work - untill i go to the home page, then all the links break again thanks |
Is there any page called ourstory in your app ? |
yes, as i said if i navigate to the url directly it works without issue |
I am on nextjs 13.4.8 and everything okey |
It works for me in debug running locally, the issue only occurs when i publish using `/** @type {import('next').NextConfig} */ module.exports = nextConfig` |
### What? When using `output: "export"`, all URL pathnames are sliced. ### Why? A regression was introduced at https://github.com/vercel/next.js/pull/50974/files#diff-7b6239af735eba0c401e1a0db1a04dd4575c19a031934f02d128cf3ac813757bR76-R80 ### How? Check if a pathname ends with `.txt` before slicing the end. Fixes #52381
When I use nginx as a proxy, refreshing the page prompts 403. If I set nginx to try_files $uri $uri/ /index.html; Refresh and jump to the home page. How do you solve it? I don't understand. |
location / { |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which example does this report relate to?
with-static-export
What browser are you using? (if relevant)
Brave: 1.52.122 Chromium: 114.0.5735.110
How are you deploying your application? (if relevant)
No response
Describe the Bug
I have encountered an issue with the
Link
component where the link path is getting cut in the middle. For example, when using the following link:<Link href="/client/uuid/coaching-guide" />
, it redirects to/client/uuid/coaching-
, resulting in a 404 error. Similar to this: #48996 (comment)Expected Behavior
Expect it to go to "/client/uuid/coaching-guide"
To Reproduce
next.config.js
NEXT-1415
The text was updated successfully, but these errors were encountered: