Commit 62e2e23a authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Revert "Remove prefixed scriptName from urlPath in PageRouter"

This reverts commit e2e59fb3 due
to certain incompatibilities with direct "index.php" calls in
certain server setups.

Resolves: #94968
Reverts: #94537
Releases: master, 10.4, 9.5
Change-Id: I558c4764e1e0399b7d92da9be0da83cb36c85cba
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70698


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent a09c6a8e
......@@ -134,7 +134,7 @@ class PageRouter implements RouterInterface
if ($normalizedParams instanceof NormalizedParams) {
$scriptName = ltrim($normalizedParams->getScriptName(), '/');
if ($scriptName !== '' && strpos($urlPath, $scriptName) !== false) {
$urlPath = str_replace('/' . $scriptName, '', $urlPath);
$urlPath = str_replace($scriptName, '', $urlPath);
}
}
}
......
......@@ -124,16 +124,6 @@ class Builder
'menu.json' => 10,
],
];
$multipleTypesConfigurationDotPhp = [
'type' => 'PageType',
'default' => '.php',
'index' => 'index',
'map' => [
'.php' => 0,
'menu.json' => 10,
'.xml' => 20
],
];
return [
PageTypeDeclaration::create('null ".html"')
......@@ -164,15 +154,6 @@ class Builder
->withGenerateParameters(['&type=0'])
->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '/', 'index' => ''])),
PageTypeDeclaration::create('null ".php"')
->withConfiguration($multipleTypesConfigurationDotPhp)
->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '.php', 'index' => 'index'])),
PageTypeDeclaration::create('0 ".php"')
->withConfiguration($multipleTypesConfigurationDotPhp)
->withGenerateParameters(['&type=0'])
->withResolveArguments(['pageType' => 0])
->withVariables(Variables::create(['pathSuffix' => '.php', 'index' => 'index'])),
];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment