Forum

Rewrite double slashes anywhere in URLs to single slashs

Peter
11 March 2016, 19:50
I'm looking for a way to replace any "//" in URLs with a single "/". In this particular case, the data is being forwarded to a reverse proxy.

I've searched for a comprehensive reference on the the language for Rewrite's syntax in an endeavour to figure it out, but I didn't find such a reference anywhere. Any guidance would be appreciated.
Hugo Leisink
13 March 2016, 19:08
Use this UrlToolkit rule:
UrlToolkit {
ToolkitID = slashes
Match /{2,} Rewrite / 9
}

The 9 indicates the maximum amount of groups of multiple slashes. Its maximum value is 20.
This topic has been closed.