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

No any logic for trailingSlash: true #1184

Closed
3 tasks done
fejmek opened this issue Jul 10, 2024 · 5 comments · Fixed by #1188 or #1190
Closed
3 tasks done

No any logic for trailingSlash: true #1184

fejmek opened this issue Jul 10, 2024 · 5 comments · Fixed by #1188 or #1190
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@fejmek
Copy link

fejmek commented Jul 10, 2024

Description

image

I looked through the entire application code and i haven't found any logic that would take into account that the application has option trailingSlashes set to true, when redirecting to the appropriate translated urls.

It makes no sense to create additional redirections and it is a big problem when we look at SEO.

I hope I have provided all the information you need

Verifications

  • I've verified that the problem I'm experiencing isn't covered in the docs.
  • I've searched for similar, existing issues on GitHub and Stack Overflow.
  • I've compared my app to a working example to look for differences.

Mandatory reproduction URL

https://github.com/fejmek/trailing-slash

Reproduction description

Steps to reproduce:

  1. Open reproduction
  2. Optionally u can install link redirect trace to follow redirect route
  3. Just open page ./pl/page/

Expected behaviour

Just simple logic to implement trailing slashes to redirects.

@fejmek fejmek added bug Something isn't working unconfirmed Needs triage. labels Jul 10, 2024
@fejmek fejmek changed the title No any logic for 'trailingSlash: true' No any logic for trailingSlash: true Jul 10, 2024
@fejmek
Copy link
Author

fejmek commented Jul 10, 2024

Also this package handle http response header link without adding trailing slash...
image

EDIT:
Oh, just now i saw the umbrella thread, where this issue is listed. There is any possible chance to deploy this change in this week, SEO scan just punched our applications because of this, just before going into production

@amannn
Copy link
Owner

amannn commented Jul 10, 2024

Hey @fejmek, thanks for the report! There was some previous discussion about this in #668.

I just had another look and I think there might not be too much missing for this. I've just set up a test suite and will have a closer look if we could address this is in a timely manner.

I'm looking into sharing a pre-release version with you as soon as my test suite is green. I'll be in touch again tomorrow!

@amannn
Copy link
Owner

amannn commented Jul 11, 2024

@fejmek A pre-release is available as next-intl@3.15.6-canary.0 that supports trailingSlash: true now.

Mind giving it a go in your app? 🙂

@fejmek
Copy link
Author

fejmek commented Jul 11, 2024

Awesome job! Thank u very much @amannn !!

Redirects are good:
image

Response header link also is good:
image

@amannn
Copy link
Owner

amannn commented Jul 11, 2024

Awesome! I'll release this to stable now 🚀

amannn added a commit that referenced this issue Jul 11, 2024
Closes #1184
Closes #668

---------

Co-authored-by: amannn <amannn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
2 participants