How to remove every "/", except the first one on nginx

49 Views Asked by At

FYI: I am trying to replicate the web archive.

Right now, all the urls I am crawling are being send to the path "D:\website\dateoftoday". My code will remove every "/" from the urls, because you can't save a file with a slash in it. I've created a nginx web server to browse through these files and it works until I try clicking on a Root-Relative path (e.g. /blog/something). This is to be expected, because that link does not exist in my path (because its called blogsomething and not /blog/something).

My question is: how do I remove the "/" in the middle of the url for EVERY url on the web server?

0

There are 0 best solutions below