Forum Discussion
skkg_111590
Nimbostratus
Dec 22, 2010need help with irule
Hi all,
I am trying to develop a new iRule. I have built this below but cannot figure why its not working.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/"} {
HTTP::redirect
}}
The requirement is to check if there is NO URI and append "/pls/htmldb/f?p=330". If there is a URI then do nothing.
Thoughts?
2 Replies
- hoolio
Cirrostratus
Hi,
All relative URIs will start with /. I think you want to match just URIs equal to /:when HTTP_REQUEST { if { [HTTP::uri] eq "/"} { HTTP::redirect "http://[HTTP::host]/pls/htmldb/f?p=330" } }
Aaron - skkg_111590
Nimbostratus
Thanks I tested this and look like its all working.
Thanks for the help.
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