Forum Discussion

Anthony's avatar
Icon for Nimbostratus rankNimbostratus
Jul 05, 2012

Probably 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,






1 Reply

  • 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/1.0 302 Found
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0