Forum Discussion

Rosario_76826's avatar
Rosario_76826
Icon for Nimbostratus rankNimbostratus
Jan 31, 2008

redirect I rule not working

Help!

 

 

This Irule is not wotking, this is the error i'm getting

 

 

01070151:3: Rule [GOREPORTING-REDIR] error:

 

line 1: [unknown event (HTTP_REQUEST)] [when HTTP_REQUEST {

 

if {[HTTP::host] eq "goreporting.abc.com"} {

 

HTTP::redirect "https:/secure.abc.com/[HTTP::uri]"

 

}

 

}]

 

 

 

I need to rediredt to another host but still reserve the uri or anythig after the /

 

 

Thanks in advance

3 Replies

  • The syntax looks okay. You're missing a forward slash after https: and the URI will already have a leading forward slash, so you should be able to use this:

    
    when HTTP_REQUEST {
       if {[string tolower [HTTP::host]] eq "goreporting.abc.com"} {
          HTTP::redirect "https://secure.abc.com[HTTP::uri]"
       }
    }

    I assume you have an HTTP profile assigned to the virtual server you're testing this rule on?

    Aaron
  • Actually i'm adding this Irule on a WIP global load balancer. The problem was the Irule is gettign rejected cause of syntax.
  • A GTM WIP will answer DNS requests with an IP address. The client isn't making an HTTP request until it first resolves the domain name to an IP address. If the WIP answer points to a BIG-IP LTM VIP, you could answer the HTTP request with an HTTP redirect to another host.

     

     

    Aaron