Collapsing multiple forward slashes in path only

Alrighty… I’ve got a proper solution working, it looks like this:

uri path_regexp /{2,} /

Or, in JSON:

{
	"handler": "rewrite",
	"path_regexp": [
		{
			"find": "/{2,}",
			"replace": "/"
		}
	]
}

Look good? Should I commit this?

2 Likes