Forum Discussion
Lee_Sutcliffe
Jan 12, 2018Nacreous
You can try this iRule - I've written it without the redirect as I presume you want to rewrite the header and URI on the fly - a redirect to a private IP may cause issues if accessing over the internet? Please correct me if not. I've also rewritten the host header using the selected back-end server IP and port you connect to, rather than hard code the IP addresses - this can be changed if needs be Let me know how you get on
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/info"} {
set newUri [string map [list "info" "files"] [HTTP::uri]]
HTTP::header replace Host "[LB::server addr]:[LB::server port]"
HTTP::uri $newUri
}
}
Cheers Lee