Hi all, tried several thing over the last couple of weeks and almost got there, but now SSL connections are failing. Hope somebody can help me the get the last piece working too.
Redirecting requests to files like `/some/path/some-name-EN-UK.pdf` to `/EN-UK/some-sub-path` where `EN-UK` is a variable where the found substring in the request's filename should be used as the prefix in the destination. I've solved this with a set of instructions: ``` acl needsredirect path_reg ^/.*[a-z][a-z]-[a-z][a-z].pdf$ acl ischina path_reg ^/.*[en\-ch|zn\-ch].pdf$ reqirep ^([^\ :]*)\ /.*([a-z][a-z]-[a-z][a-z]).pdf \1\ /\2/404 if needsredirect !ischina redirect scheme https code 301 if needsredirect !ischina ``` The first 2 lines determine if we have to redirect which is the case if `needsredirect` is TRUE and `ischina` is FALSE. The third line does the regex on all headers and the fourth is then doing the redirect with the modified header values which is doing the right thing if the original request had been to http://something. My problem is line 3 in the context of a https request. HaProxy responds with a `HTTP/1.1 400 Bad Request` and I'm stuck with this approach. Is there a way to fix this by e.g. only modifying specific header fields (if so, which and how) or is there even a beter way of approaching the task? I'm very greatful for every help I can get for this problem. Thanks Jürgen
signature.asc
Description: OpenPGP digital signature

