From 4692d7ef2a441ce581c8cda0f44bcacc7e12b62c Mon Sep 17 00:00:00 2001 From: Johannes Feichtner Date: Sun, 20 Sep 2015 15:23:20 +0200 Subject: [PATCH] Nginx: Changed inefficient RegEx redirect to equivalent 301 --- scripts/jobs/cron_tasks.inc.http.30.nginx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/jobs/cron_tasks.inc.http.30.nginx.php b/scripts/jobs/cron_tasks.inc.http.30.nginx.php index aae88026..83903077 100644 --- a/scripts/jobs/cron_tasks.inc.http.30.nginx.php +++ b/scripts/jobs/cron_tasks.inc.http.30.nginx.php @@ -427,7 +427,7 @@ class nginx extends HttpConfigBase { if (substr($uri, -1) == '/') { $uri = substr($uri, 0, -1); } - $vhost_content .= "\t".'rewrite ^(.*) '.$uri.'$1 permanent;'."\n"; + $vhost_content .= "\t".'return 301 '.$uri.'$request_uri;'."\n"; } else { mkDirWithCorrectOwnership($domain['customerroot'], $domain['documentroot'], $domain['guid'], $domain['guid'], true);