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:
parent
3ba900b8b6
commit
53e792cffa
@ -192,8 +192,8 @@ http {
|
||||
gzip_static on;
|
||||
brotli_static on;
|
||||
|
||||
if ($request_uri ~ (.*)//(.*)) {
|
||||
return 301 $1/$2;
|
||||
if ($request_uri ~ //) {
|
||||
rewrite ^(.*)$ $1 permanent;
|
||||
}
|
||||
|
||||
location = /, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user