There are a few similar questions on SO, but none that work for this specific scenario.
I want to replace all forward slashes in a URL path with dashes, using mod_rewrite
.
So https://stackoverflow.com/foo/bar/baz should redirect to https://stackoverflow.com/foo-bar-baz.
There could be any number of segments in the path (between forward slashes).
I think the solution involves the N flag, but every attempt I've made results in an endless loop.