Forum Discussion
Need help with iRule
Is it possible to do a redirect in case the customer uses URL: https://example.com/test/index.html to https://example.com/test/my.jsp. Anything else after index.html should be allowed. like url https://example.com/test/index.html/transfer is allowed without any redictions .
we already have irule for first condition ( redirect to /test/my.jsp. I am not sure about second part.
- KJ_50941
Nimbostratus
so if first condition already being done with if statement and it is working i am assuming second condition should be elseif send to default as only pool? will that work?
- Kevin_Stewart
Employee
If I understand the requirement, you want to redirect anyone that goes directly to "/test/index.html", but not if there's something after this in the URI (ex. "/test/index.html/transfer".
In that case, you could probably use a static equals evaluation in your iRule:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] equals "/test/index.html" } { HTTP::redirect "/test/my.jsp" } }
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