Redirect with original url as encoded parameter

I have the following configuration setup which works fine:

frontend http-in
    bind *:80
    mode http
    option  http-server-close
    option  forwardfor
    option  httplog

    acl redirect_domain hdr(Host) -i
    acl redirect_domain hdr(Host) -i
    acl redirect_domain hdr(Host) -i
    http-request redirect location code 302 if redirect_domain 

    default_backend web_default

This redirects my example[1-3].com to with a 302 redirect (Yes, I want the 302).
Now what I want to achieve is passing the original url to the “”, but the problem is that the URL won’t be encoded:

http-request redirect location[hdr(host)]%[url] code 302 if redirect_domain

This results in the URL to be build like:

While it should look like:

Is there any way how I can get HAProxy to apply url encoding to my referer param?