basic irule

Instructions

  1. Fill in the Contributed by, Description, and iRule Source fields below.
  2. Select “SAMPLECODE” and other approprate categories.
  3. Add a meta description
  4. Include relevant iRule commands,events,etc used in this iRule.
  5. Delete this section.
  6. Click Save.

Contributed by:

when HTTP_REQUEST {
    if { [HTTP::uri] starts_with "/book/" || [HTTP::uri] starts_with "/manage/" || [HTTP::uri] starts_with "/check/" } {
        HTTP::redirect http://xyz.com/maintenancepage/
    }
}

HTTP REDIRECT

when HTTP_REQUEST {
    if { [HTTP::uri] starts_with "/book/" || [HTTP::uri] starts_with "/manage/" || [HTTP::uri] starts_with "/check/" } {
        HTTP::redirect http://xyz.com/maintenancepage/
else
    }
}

iRule Source

when HTTP_REQUEST {
  switch -glob [HTTP::query] {
      "qName=dest|qName=orig|qName=recip|qName=ship" {
         pool ECQS2-DFARM_8011
      }
      "qName=trk|qName=trackNbr|qName=relationship|qName=rmaNo" {
         pool ECQS2-SINGLEAMP_8011
      }
      "method=POST" {
         pool ECQS2-DFARM_8011
      }
      "qName=cons|qName=detail|qName=imsNext|qName=masterRel|qName=childRel|qName=reverse|qName=vessel|qName=contain" {
         pool ECQS2-PASSTHROUGH_8011

      default {
         pool ECQS2-DFARM_8011
      }
   }
}

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.