From f46e921b710b02d5a1f17f0dd076a5bf085ae735 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 12 Aug 2018 13:41:33 +0200 Subject: Use domain for links to '/' to fix assets URLs on subdirectories --- src/Routing/LegacyUrlGenerator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Routing') diff --git a/src/Routing/LegacyUrlGenerator.php b/src/Routing/LegacyUrlGenerator.php index 4c1e736b..fdac4f96 100644 --- a/src/Routing/LegacyUrlGenerator.php +++ b/src/Routing/LegacyUrlGenerator.php @@ -4,7 +4,7 @@ namespace Engelsystem\Routing; /** * Provides urls when webserver rewriting is disabled. - * + * * The urls have the form /index.php?p=& */ class LegacyUrlGenerator extends UrlGenerator @@ -24,6 +24,7 @@ class LegacyUrlGenerator extends UrlGenerator $uri = parent::linkTo('index.php', $parameters); $uri = preg_replace('~(/index\.php)+~', '/index.php', $uri); + $uri = preg_replace('~(/index\.php)$~', '/', $uri); return $uri; } -- cgit v1.2.3-54-g00ecf