I'm dealing with requests from a proprietary client, that sometimes uses back- rather than forward-slashes: GET /path\to\the\file.txt
, and I'd like to straighten them all out.
mod_rewrite can replace one at a time:
RewriteRule ^(.*)\\+(.*) $1/$2 [QSA]
but how would I replace all such occurrences at once, like sed's /g
modifier?