Forum Discussion
Anthony
Nimbostratus
Jul 05, 2012Probably a very sinple request... if you know how
Hi all. I've been doing various work in the LTM and recently ASM, and now I need to start working on iRules.
I know what I want to do, but for some reason I'm getting mixed results.
There are a few conditions I need to meet with this iRule.
1: if the request is / let it through, our apache server will the redirect this to the required page.
2: if the request contains a pattern of xx/yy_zz (gb/en_gb for example) then do nothing.
3: if the request doesn't contain above pattern redirect it to gb/en_gb with the uri appended.
I'll carry on working on this, but would like to see what the forum can offer me while I do so.
Thanks in advance,
Anthony
- nitass
Employee
is it something like this?[root@ve10:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { if { not ([HTTP::uri] equals "/") and \ not ([HTTP::uri] contains "gb/en_gb")} { HTTP::redirect "http://[HTTP::host]/gb/en_gb[HTTP::uri]" } } } [root@ve10:Active] config curl -I http://172.28.19.79/something HTTP/1.0 302 Found Location: http://172.28.19.79/gb/en_gb/something Server: BigIP Connection: Keep-Alive Content-Length: 0
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