diff --git a/Neos.Neos/Classes/Controller/Frontend/NodeController.php b/Neos.Neos/Classes/Controller/Frontend/NodeController.php index 024a4453680..123b33cb39f 100644 --- a/Neos.Neos/Classes/Controller/Frontend/NodeController.php +++ b/Neos.Neos/Classes/Controller/Frontend/NodeController.php @@ -106,6 +106,9 @@ class NodeController extends ActionController #[Flow\Inject] protected RenderingModeService $renderingModeService; + #[Flow\InjectConfiguration(path: "frontend.shortcutRedirectHttpStatusCode", package: "Neos.Neos")] + protected int $shortcutRedirectHttpStatusCode; + /** * @param string $node Legacy name for backwards compatibility of route components * @throws NodeNotFoundException @@ -299,7 +302,8 @@ protected function handleShortcutNode(NodeAddress $nodeAddress, ContentRepositor } else { $resolvedUri = $resolvedTarget; } - $this->redirectToUri($resolvedUri); + + $this->redirectToUri($resolvedUri, statusCode: $this->shortcutRedirectHttpStatusCode); } private function fillCacheWithContentNodes( diff --git a/Neos.Neos/Configuration/Settings.yaml b/Neos.Neos/Configuration/Settings.yaml index 4f45714082b..715dc37d895 100755 --- a/Neos.Neos/Configuration/Settings.yaml +++ b/Neos.Neos/Configuration/Settings.yaml @@ -82,6 +82,10 @@ Neos: label: 'Neos.Neos:Main:nodeTypes.groups.plugins' collapsed: true + frontend: + # HTTP Status Code used for redirecting Neos.Neos:Shortcut to target + shortcutRedirectHttpStatusCode: 303 + userInterface: # Switch on to see all translated labels getting scrambled. You now can localize