Forum Discussion

3 Replies

  • just trying to get an http request that has the idssupportapi01 in it to redirect to a certain url or host machine, whichevere is easier.
  • is idcsupportapi01 hostname or uri?



    if it is hostname, you should use HTTP::host instead of HTTP::uri.



    What's A URL?




  • e.g.

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       ip protocol 6
       rules myrule
       profiles {
          http {}
          tcp {}
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
       set reqd_host [string tolower [HTTP::host]]
       log local0. "Reqd_uri is $reqd_host"
       if { $reqd_host  contains "idcsupportapi01" } {
          log local0. "$reqd_host contains idcsupportapi01"
          HTTP::redirect "[HTTP::uri]"
          log local0. "$reqd_host redirected to"
    [root@ve1023:Active] config  curl -I
    HTTP/1.0 302 Found
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0