URL rewriting?

From: Chris Charman <chris#bizo.com>
Date: Wed, 27 Aug 2008 11:02:51 -0700


I'm trying to see if I can do URL rewriting on the backend. First of all, is that possible?

Here's a snippet of my config:

backend data

        mode http
        log global
        # Rewrite the request to map old URLs to new services
URLs.

       reqirep ^(GET\ .*)(/BzServices.*)?(.*)(clientredirurl)(.*$)
\1/services/redirect/?\3\4

       reqirep ^(POST\ .*)(/BzServices.*)?(.*)(clientredirurl)(.*$)
\1/services/redirect/?\3\4

       reqirep ^(GET\ .*)(/BzServices/DemographicQuery.aspx)?(.*$)
\1/services/query/?\3

       reqirep ^(POST\ .*)(/BzServices/DemographicQuery.aspx)?(.*$)
\1/services/query/?\3

       reqirep ^(GET\ .*)(/BzServices.*)?(.*$)
\1/services/collect/?\3

       reqirep ^(POST\ .*)(/BzServices.*)?(.*$)
\1/services/collect/?\3

        option httpchk HEAD /__LB_TEST.html
        server host01 hostname:port check
        server z_nothing               localhost:18000 backup check
# end backend data

Here's what I'm getting in the logs:
Aug 27 17:54:44 localhost.localdomain haproxy[24655]: 66.7.250.234:62186[27/Aug/2008:17:54:44.391] http_in data/<NOSRV> -1/-1/-1/-1/3 400 187 - -
PR-- 0/0/0/0/0 0/0 {data.mydomain.co|Mozilla/5.0 (Mac||} {} "GET /BzServices/Redirect.aspx?partnerid=42 HTTP/1.1"

Is this even possible? It doesn't seem to matter if I put the rewrite rules in the frontend or the backend.

Do I need to point this at an http server running mod_rewrite or something?

Thanks in advance...

-Chris Received on 2008/08/27 20:02

This archive was generated by hypermail 2.2.0 : 2008/08/27 20:15 CEST