How can I add a trailing slash to TYPO3 v9 URLs?

后端 未结 4 449
庸人自扰
庸人自扰 2021-01-31 22:51

When updating from TYPO3 8.7 to TYPO3 9.5 you might drop the realurl extension in favor for the new routing feature.

But you might notice, that realurl appended a / to a

4条回答
  •  执笔经年
    2021-01-31 23:29

    Tim, are you sure about getRoutePathRedecorationPattern()?

    For me, it worked in two totally different TYPO3 (v9.5.3) instances in production, but both projects did not work in a ddev-container. There, the slugCandidates have always missed its last char.

    Changing the pattern from "all except slash" to "exactly a slash" makes it work.

    public function getRoutePathRedecorationPattern(): string
    {
        return '\/$';
    }
    

提交回复
热议问题