Depending on the complexity of some applications, the ProxyPass iRule can be a necessary evil. It does the job of rewriting the incoming
AND outgoing payloads, including URIs and Host headers. Thankfully the iRule is fairly well documented so it's not that difficult to set up.
1. Create the iRule - copy it from the website and modify the two values in the RULE_INIT event to enable (temporary) logging.
2. Create a data group called "ProxyPass". So for example, if the virtual server is called "my_vs", the data group would be called "ProxyPassmy_vs".
3. Create a series of entries that translate clientside requests to server side requests.
ex.
"/clientdir" := "/serverdir"
"
www.host.com/clientdir" := "internal.company.com/serverdir"
"
www.host.com/" := "internal.company.com/serverdir/"
"/abc123/" := "/xyz987/"
** for you application you probably just need to work with URIs.
It may take a little work to get this part just right depending on your application, but the logging will guide you.
Like I said, ProxyPass is designed to deal with complex applications. In the event, however, that your website doesn't require all of this, a simpler iRule to just catch the incoming URI and change it would look something like this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/abc123/test/test.htm" } {
HTTP::uri "/xzy987/"
}
}