iRule URL rewrite, request header rewrite, response header rewirte
Hi,
I have a reverse proxy transfer from Bluecoat to F5, now my question ! How can I do the same as in my Bluecoat config via iRule ?
here is my config !!!
; ------------------------------------------------------------
; Rewrite Server Pages
; Syntax:
; rewrite_url_substring "client_url_substring" "server_url_substring"
; ------------------------------------------------------------
define url_rewrite rewrite_pages
; Rewriting http links
rewrite_url_prefix "https://shop.example.com" "http://row.jump.net:8000"
rewrite_url_substring "shop.example.com" "row.jump.net"
; Rewriting embedded html links to external links
; Rewriting embedded javascript links to external links
rewrite_script_substring "shop.example.com" "row.jump.net"
end url_rewrite rewrite_pages
; ------------------------------------------------------------
; TWURL
; ------------------------------------------------------------
define action twurl
; Rewrite Client Request Header
rewrite( request.header.host, "shop.example.com", "row.jump.net")
rewrite( request.header.referer, "*)", "http://row.jump.net:8000$(1)" )
; Rewrite Server Response Header
rewrite( response.header.Set-Cookie, "(.)jump.net(.)", "$(1)example.com$(2)" )
rewrite( response.header.Location, ")", "https://shop.example.com$(1)" )
rewrite( response.header.Content-Location, ")", "https://shop.example.com$(1)" )
; Rewrite Page Content transform rewrite_pages
end action twurl
; ------------------------------------------------------------
;Delete Accept-Encoding Header
; ------------------------------------------------------------
define action ForceUncompressedResponse
delete( request.header.Accept-Encoding )
end action ForceUncompressedResponse
maybe someone can give me a example iRule, I would say the URL rewrite is easy but how have to look the other thinks I don't know ! It would be nice when I get help to realize this Bluecoat config in a iRule.
THX Manu