Hi,

Le 27/07/2015 17:06, mlist a écrit :
Hi Aleksandar,

Please, when you start a new thread, try to send it to the the mailing list instead of adding by default some users who helped you in the past (and btw, Aleksandar was not in the recipients).

I'm compiled with USE_PCRE=yes flag. At 
http://cbonte.github.io/haproxy-dconv/configuration-1.6.html#4.2-reqirep
In the example
replace /static/" with "/" at the beginning of any request path.

        reqrep ^([^\ :]*)\ /static/(.*)     \1\ /\2"

I changed the regex with this:

(1)     reqirep ^([^\ :]*)\ /demoj(.*)     \1\ /DemoJ\2

and also to this more simple (for my regex acknoledge)...:

(2)     reqirep (.*)\/demoj(.*)     \1/DemoJ\2

The redirection work well for the request line, but I cannot see change in the request 
header "Referer:" as example, as you can see below

GET  /DemoJ/img/entra.gif;jsessionid=21DC3F99E5604CC9AD8482CCA9286B65 HTTP/1.1
Host: demo.hypersic.net
...
Referer: https://demo.mydomain.net/dEmOj/
...


So the client can connect correctly also if it enter wrong case, but in the 
Browser URL often remain in wrong case.
Can you help me ?

Indeed, look at the regex, it's not designed to match the Referer.
This one would match :
Referer: /dEmOj/

As an exercise, you can try to find a regex that will apply to both the request line and the Referer header, or manage 2 distinct regex replacements.

--
Cyril Bonté

Reply via email to