Answer the question
In order to leave comments, you need to log in
How to combine multiple redirects into one NGINX?
https://baitrend.com///// -> https://baitrend.com/
Several redirects occur from this page, which gradually remove 1 slash from the url. It shouldn't be like that. The redirect should be only 1, removing all slashes from the url at once.
That's how SEO-shniks set us the task.
This code is gradually removed by 1 slash from the URL.
How can I combine all slashes with one redirect? rewrite ^/(.*)/$ /$1 permanent;
Answer the question
In order to leave comments, you need to log in
rewrite ^/(.+?/)/+$ /$1 permanent;
or maybe you need merge_slashes
itblog.by/articles/47-nginx-ubrat-slesh-v-konce-ur...
searchengines.guru/showthread.php?t=814983
magilex.it/post/ybiraem_lishnie_sleshi_iz_adresa_u...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question