Forum Discussion
jtostado_47719
Nimbostratus
Oct 21, 2009BIGIP 4.5 to 9.3.1 iRule Conversion
I need help converting this rule:
if (http_uri ends_with one of portal_redirect_class) {
redirect to "https://psp-portal.com/portal/server.pt"}
else {
use pool SHAREPOINT
}
27 Replies
- Sams_88783
Nimbostratus
Thanks Battman.It worked. - The_Bhattman
Nimbostratus
Hi Sumod,
you could write it is. . . else if { ([HTTP::uri] starts_with "/nos8") and !([HTTP::header "SSLClientCertStatus"] eq "OK" ) } { HTTP::redirect "https://syst.com/nos8/" . . .
I hope this helps
Bhattman - Sams_88783
Nimbostratus
Please help me to convert irule
else if (http_uri starts_with "/nos8" and not (http_header("SSLClientCertStatus") == "OK")) {
redirect to "https://syst.com/nos8/"
} - jtostado_47719
Nimbostratus
That did the trick. Thanks a bunch. - The_Bhattman
Nimbostratus
There was syntax error on minewhen HTTP_REQUEST { if { [HTTP::uri] ends_with ".jpg" } { HTTP::redirect "https://psp-portal.com/portal/server.pt" } else { pool SHAREPOINT } }
orwhen HTTP_REQUEST { if { [HTTP::uri] ends_with $::portal_redirect_class } { HTTP::redirect "https://psp-portal.com/portal/server.pt" } else { pool SHAREPOINT } }
Keep in mind that this is an example.
CB - jtostado_47719
Nimbostratus
I got error with both!
They both say:
line 1 - parse error:missing close-brace
line 2 - command is not valid in the current scope - The_Bhattman
Nimbostratus
I suppose it can be re-written to the followingwhen HTTP_REQUEST { if { [HTTP::uri] ends_with ".jpg" } { HTTP::redirect "https://psp-portal.com/portal/server.pt" else { pool SHAREPOINT } }
orwhen HTTP_REQUEST { if { [HTTP::uri] ends_with $::portal_redirect_class } { HTTP::redirect "https://psp-portal.com/portal/server.pt" else { pool SHAREPOINT } }
I hope this helps
CB
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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