Typo3 9.5.0 LTS introduces many new features. One of them is that readable URLs are now a core feature.
Many Typo3 installations were previously operated with RealURL. With RealURL many pages were configured to append the suffix '.html'.
If you want the readable URLs to be callable with this extension after an upgrade to Typo3 9.5.0 LTS, you have to define a PageType suffix in the page configuration.
First the site configuration has to be crated:
- Site management -> Sites
- Add new site configuration for this site
- Configure and save accordingly
- We now need the "Site Identifier" to edit the configuration file:
- typo3conf/sites/[Site Identifier]/config.yaml
Add the following at the end of config.yaml:
routeEnhancers: PageTypeSuffix: type: PageType default: '.html' map: '.html': 0
The 0 in the last line is the typeNum.
Please note, however, that this is actually intended to request a certain PageType via the suffix.
Thus the standard PageType is always returned by calling the URL without suffix. In our case both URLs work without a redirect:
In order to avoid duplicate content it is therefore essential to set the Canonical tag with this solution!