How to redirect double slash in URL using NGINX

Viewed 25

We have an external backlink with a double slash pointing to our website, ending on 404. Now I want to redirect that backlink to the correct version.

/en//effective-link-prospecting-with-marketing-miner-in-4-steps.html

to this version:

/en/blog/effective-link-prospecting-with-marketing-miner-in-4-steps.html

In NGINX I tried this (but it's not working I think because of double slash in the URL)

rewrite ^/en//effective-link-prospecting-with-marketing-miner-in-4-steps.html https://www.marketingminer.com/en/blog/effective-link-prospecting-with-marketing-miner-in-4-steps.html permanent;

0 Answers
Related