The haproxy log contains the original request, not the rewritten one. If
you want to see the rewritten URL you need to look at the backend server
which is receiving the request.

-Patrick


------------------------------------------------------------------------
*From: *Steve Phillips <stw...@gmail.com>
*Sent: * 2014-03-04 19:54:44 E
*To: *HAProxy <haproxy@formilux.org>
*Subject: *rewrite URI help

> Trying to reverse proxy all requests to 
>
> /slideshare 
>
> to 
>
> www.slideshare.net/api/2/get_slideshow
> <http://www.slideshare.net/api/2/get_slideshow>
>
> my front-end config:
>
>  acl url_slideshare   path_dir       slideshare
>  use_backend slideshare         if url_slideshare
>
> and back-end:
>
> backend slideshare
>   option http-server-close
>   option httpclose
>   reqrep ^([^\ ]*)\ /slideshare(.*)      \1\ /api/2/get_slideshow\2
>   server slideshare www.slideshare.net:443
> <http://www.slideshare.net:443> ssl verify none
>
> requests to /slideshow however, are not being rewritten:
>
> 173.11.67.214:60821 <http://173.11.67.214:60821>
> [04/Mar/2014:19:49:03.257] main slideshare/slideshare
> 6142/0/289/121/6552 404 9299 - - ---- 0/0/0/0/0 0/0 {} "GET
> /slideshare?slideshow_url=http%3A%2F%2Fwww.slideshare.net
> <http://2Fwww.slideshare.net>%2FAaronKlein1%2Foptimizing-aws-economics&detailed=1&api_key=msCpLON8&hash=a7fe5fd52cc86e4a4a3d1022cb7c63476b79e044&ts=1393980574
> HTTP/1.1"
>
> Is my regex incorrect?  Am I missing something else?  
>
> Thanks.
>
> Steve

Reply via email to