improve approach to redundant slash redirection

Since merge_slashes gets rid of the redundant slashes, a no-op rewrite
will get rid of all of them at once instead of requiring one redirect to
get rid of each redundant slash.
This commit is contained in:
Daniel Micay 2022-01-03 06:44:39 -05:00
parent 3ba900b8b6
commit 53e792cffa

View File

@ -192,8 +192,8 @@ http {
gzip_static on; gzip_static on;
brotli_static on; brotli_static on;
if ($request_uri ~ (.*)//(.*)) { if ($request_uri ~ //) {
return 301 $1/$2; rewrite ^(.*)$ $1 permanent;
} }
location = /, { location = /, {