Bug #90579
open
Redirects module only works on URLs with trailing slashes
Added by Florian Grell about 4 years ago.
Updated about 4 years ago.
Category:
Link Handling, Site Handling & Routing
Description
As an editor, I want to be create a redirect from "/source-path/" to "/source-path" (remove the trailing slash).
This leads to an infinite redirect loop.
Please post your Site configuration as well.
base: /
baseVariants: { }
disableStaticFileCache: false
errorHandling:
-
errorCode: '404'
errorHandler: Page
errorContentSource: 't3://page?uid=50'
languages:
-
title: Deutsch
enabled: true
languageId: '0'
base: /
typo3Language: default
locale: de_DE
iso-639-1: de
navigationTitle: ''
hreflang: de-DE
direction: ''
flag: de
-
title: Englisch
enabled: true
languageId: '2'
base: /en/
typo3Language: default
locale: en_US
iso-639-1: en
navigationTitle: ''
hreflang: ''
direction: ''
fallbackType: strict
fallbacks: '1'
flag: en-us-gb
rootPageId: 1
routeEnhancers:
NewsPlugin:
type: Extbase
extension: News
plugin: Pi1
routes:
- routePath: '/'
_controller: 'News::list'
-
routePath: '/{news_title}'
_controller: 'News::detail'
_arguments:
news_title: news
-
routePath: '/{page}'
_controller: 'News::list'
_arguments:
page: '@widget_0/currentPage'
defaultController: 'News::list'
defaults:
page: '0'
requirements:
page: '\d+'
aspects:
page:
type: StaticRangeMapper
start: '1'
end: '100'
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
CoursePlugin:
type: Extbase
limitToPages:
- 44
extension: MyExtkey
plugin: Myplugin
routes:
-
routePath: '/{number}'
_controller: 'Myplugin::detail'
_arguments:
number: number
aspects:
number:
type: MypluginValueMapper
PageTypeSuffix:
type: PageType
map:
sitemap.xml: 1533906435
routes: { }
I believe the problematic code is in the RedirectService, Lines 67-69:
if (!empty($allRedirects[$domainName]['flat'][rtrim($path, '/') . '/'])) {
$possibleRedirects = $allRedirects[$domainName]['flat'][rtrim($path, '/') . '/'];
}
- Status changed from New to Accepted
Also available in: Atom
PDF