Forum Discussion
rade5_74503
Nimbostratus
Jan 03, 2019Irule - For redirection
How can I create an irule for redirection
https://www.test.com/promotion.jsp!/fanta-manager to https://www2.test.com/scommesse
This is what I have at the moment (Does not work)
when HT...
Andy_McGrath
Cumulonimbus
Jan 03, 2019As already stated anchor tags are not passed to the web server so the F5 will not see them, the solution proposed is to use a STREAM profile and update the link in the HTML instead of doing a redirect.
Not tested this iRule but generally this should look for the text
!/fanta-manager and replace it with https://www2.test.com/scommesse but only if the request is to https://www.test.com/promotion.jsp
e.g. the link in the HTML might be
when HTTP_REQUEST {
set streamFlg false
STREAM::disable
if { ([string tolower [HTTP::host]] eq "www.test.com") and ([string tolower [HTTP::uri]] eq "/promotion.jsp")} {
set streamFlg true
}
}
when HTTP_RESPONSE {
if {$streamFlg} {
STREAM::expression {@!/fanta-manager@https://www2.test.com/scommesse@}
STREAM::enabled
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
