I found out that I can chain requests i.e.:
a = {couch_httpd_proxy, handle_proxy_req,
<<"http://couchdb:5984<http://server:1234/c>
">>}
b = {couch_httpd_proxy, handle_proxy_req, <<"http://server:1234/c">>}But that means that I cannot rewrite "b" (when it doesn't come with "a/" before) and also it results an extra request. Any idea? On Wed, Jan 15, 2014 at 3:18 PM, Boaz Citrin <[email protected]> wrote: > Hello, > > I am trying to achieve Url rewrite of this form: > > http://couchdb:5984/a/b/* => http://server:1234/c/* > > Tried this without success: > a/b = {couch_httpd_proxy, handle_proxy_req, <<"http://server:1234/c">>} > > Getting: > {"error":"not_found","reason":"no_db_file"} > > I wonder if I need to escape the "/" somehow. Tried a%2Fb but got the same > result. > > Any idea? > > Thanks! > > Boaz > >
