Brett_10648
Oct 31, 2012Nimbostratus
Apache proxy rewrite to F5
Hi,
I'm tring to convert the following Apache Rewrite rule to an F5 iRul but am having no luck. I think I am am on the right track but would be grateful for any assistance.
This is the apache rule:
RewriteRule ^(.*)/lmykproxy/(.*) http://subdomain.domain.com/$2 [P,L]
This is the iRule I have so far..
when HTTP_REQUEST {
if {[HTTP::uri] contains "lmykproxy"} {
log "Requested URL is [HTTP::host][HTTP::uri]"
set newuri [findstr [HTTP::uri] /lmykproxy/ 11]
HTTP::uri "$newuri"
HTTP::header replace "Host" "subdomain.domain.com"
log "New URL is [HTTP::host][HTTP::uri]"
}
}
Thanks in advance.