Forum Discussion
iRule redirect with URL masking and URI rewrite
- Aug 09, 2017
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 } }
`
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
}
}
`
Thanks Yann for the prompt response. I am a newbie to iRuling. So isn't it just possible to redirect https://buyer.abc.com to without using a pool or node in the backend and let the redirection itself take care of the traffic getting forwarded to the server.
Another thought is that can we use the pool instead of node while using the relative path method?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com