Artur. Am 08.07.19 um 14:25 schrieb Artur: > Hello, > > Could you please suggest how to rewrite following rules written with > 'regrep' with 'http-request replace-uri' : > > frontend www > reqrep ^([^\ ]*)\ /p3/js/(.*) \1\ /p3/js-min/\2 > > The idea is to rewrite something similar to "GET /p3/js/file.js > HTTP/1.1" with "GET /p3/js-min/file.js HTTP/1.1". >
You basically can copy over the "second half" of your rule and adjust the numbers referencing the capturing groups: http-request replace-uri /p3/js/(.*) /p3/js-min/\1 Consider either adding a `^` at the start to only match URLs starting with /p3/ or add an `if` that ensures only URLs starting with /p3/ are modified. Best regards Tim Düsterhus