We are loooking to do some URI rewrites with the Proxypass irule that acheive the following:
so the unique part of the URI could be evergrowing in the order of thousands and will be dynamic hence a rule in the datagroup for each possible match is not suitable.
clients do not support redirects so proxy seems like the only choice.
datagroup strings like the following don’t work either “hostA/pathA/*/” := “hostB/pathB/ Pool_B”
Any ideas ??
What you have described is just a regex match and replace. Doesn’t really require a data-group unless the pattern doesn’t persist or is not something you can match on. Kinda looks like a one liner. Perhaps data groups could come into play if you had a host[a-x] mapping to host[A-X] and likewise with paths but still a regex should fill the gaps.
Hi,
Below an irule that may help you to start :
when HTTP_REQUEST {
if { [HTTP::host] eq "hostA" } {
can set hostname in v11.5+ otherwise, should use HTTP::header replace Host "hostB"
HTTP::host "hostB"
}
Rewrite uri
HTTP::uri "/pathB/[URI::basename]"
}
Hi,
Below an irule that may help you to start :
when HTTP_REQUEST {
if { [HTTP::host] eq "hostA" } {
can set hostname in v11.5+ otherwise, should use HTTP::header replace Host "hostB"
HTTP::host "hostB"
}
Rewrite uri
HTTP::uri "/pathB/[URI::basename]"
}
For the response rewrite, you will need a stream profile
For the response rewrite, you will need a stream profile
Gathering from the responses that ProxyPass iRULE doesn’t support wildcarding so I am going to have to get dirty. I might borrow from ProxyPass how they do the streaming. Will reply back with updates and share the results!
Gathering from the responses that ProxyPass iRULE doesn’t support wildcarding so I am going to have to get dirty. I might borrow from ProxyPass how they do the streaming. Will reply back with updates and share the results!