On Mon, Oct 11, 2010 at 04:12:00PM -0400, Les Stroud wrote:
> I am simply looking to forward all requests to / go to /appname on the
> backend. So, http://servername would redirect/forward to
> http://servername/appname.
OK, but "redirect" is very different from "forward". With "forward",
I understand you want to rewrite the request to add a prefix to it.
With "redirect", I understand that you want to build a redirect response
to ask the client to try again at a different URL.
So if your need is just to rewrite the request you forward, then you
should use the good old "reqrep" statement. It rewrites any line in
the request (including the request line). It has a bit of a barbarian
syntax since it's based on regex, but basically in your case that would
look like that :
reqrep ^([^\ ]*\ )(/.*) \1/appname\2
\1 holds the method and the space.
\2 holds the URI and HTTP version
Regards,
Willy