Bug #87544
closedURI matching is case-sensitive
0%
Description
The PageUriMatcher in TYPO3 9 is case-sensitive.
All slugs are created in lowercase.
If I try to call an existing page www.example.com/en/text with www.example.com/en/Test I get an error.
Resolving the correct page should work without consideration of the case.
Or it should at least be configurable to turn off the case-sensitivity.
Updated by Josef Glatz almost 6 years ago
I post a stackoverflow thread as base for discussing this important topic: https://stackoverflow.com/questions/15641694/are-uris-case-insensitive
Updated by Andreas Engel almost 6 years ago
The problem here is that URIs were not case-sensitive with realurl. So migrating to v9 without realurl might break links which customers were accustomed to use.
Updated by Josef Glatz almost 6 years ago
- Priority changed from Should have to Must have
I think this is more a must from your described perspective.
Updated by Josef Glatz over 5 years ago
@Benni Mack to you see a chance that it is possible to add an case-insensitive option for routeEnhancers for example?
Updated by Gerrit Code Review over 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/60504
Updated by Benni Mack over 5 years ago
- Status changed from Under Review to New
As mentioned, everything beyond the TLD is managed by the actual server software (apache / nginx), Apache can be configured to have both variants allowed, so:
a) TYPO3 v9 generates URLs in lower-case by default
b) if your server is not configured to treat both URLs the same way, you're doomed.
In our case of our projects, we built a PSR-15 middleware to overcome this issue, and redirect to a lower-case variant.
Updated by Benni Mack over 5 years ago
- Status changed from New to Needs Feedback
Maybe you want to try out this extension? https://github.com/b13/justincase
Updated by Benni Mack over 5 years ago
- Status changed from Needs Feedback to Rejected
The extension was just published to TER, and works just fine, solves the issue and is compatible with TYPO3 v9 and TYPO3 v10. I recommend using the extension, as this only affects
a) TYPO3 installations with URLs that are communicated in a wrong fashion from external people
b) RFC states we (TYPO3 Core) should stay case-sensitive, as per "SHOULD" definition - maybe I will change my mind but I think we're good for now.
In general, I assume we need to consider how to "create" slugs for pages that they could be upper-case if requested, but that's a bigger and separate topic.
For reference:
https://github.com/b13/justincase
https://extensions.typo3.org/extension/justincase/
If you feel we should keep this issue open for some reason, let me know.