iRule redirect with URL masking and URI rewrite
Hi,
I am looking for a iRule to do a URL redirection and also appending a URI to the redirected URL. The redirected URL should be masked so that the client will not see that in the address bar.
The iRule I tried is given below. Which didn't work. Do I need to create a pool and add the server (myserver01:9001) to it?.
The url loads fine from the server when I browse it from the LAN network
when HTTP_REQUEST { if { (([HTTP::host] contains "buyer.abc.com") and ([HTTP::uri] equals "/" )) }{ HTTP::redirect } }
Hi,
You can't achieve what you are expecting without using iframes. But I strongly discourage you to use them for security reasons.
You can instead redirect to a relative path and then forward the request to the correct backend server :
`
when HTTP_REQUEST { if { [HTTP::host] contains "buyer.abc.com" and [HTTP::path] eq "/" } { HTTP::redirect "/apm/rest/MOBILITY/authService/1.0" return } if {[HTTP::host] contains "buyer.abc.com" and [HTTP::path] eq "/apm/rest/MOBILITY/authService/1.0"} { node myserver01 9001 return } }
`