[MURLTRANS-39] URLTrans filter should return 404 if lang code does not correspond with URI Created: 04/Feb/24 Updated: 05/Feb/24 |
|
| Status: | In Progress |
| Project: | URL Translation |
| Component/s: | None |
| Affects Version/s: | 6.2.4 |
| Fix Version/s: | 6.2.5 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Richard Gange |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.75d | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Work Started: | |||||
| Description |
|
The problem seems to be limited to the default language but it's possible to make requests to the system where the requested URI does match the requested language. Consider a site with two languages, english and german. For example there is a hierarchy that looks like this:
A proper request for the german content would be: However, I am also able to access the german content with the default URL: While both URLs technically make sense it's bad for SEO. The URLTransFilter needs to block the default URL and return a 404. Or at least have a toggle to block the default access. Notes The point is with URL translation we are overriding the page nodes names with translations which should be unique. |
| Comments |
| Comment by Richard Gange [ 05/Feb/24 ] |
|
This ticket introduces a new filter setting and voter. In order to block the default URIs you can use blockDefaultUrls set true with a LocaleVoter which skips the default language. |