For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

jklemm2000's avatar
jklemm2000
Icon for Nimbostratus rankNimbostratus
Jun 16, 2007

Need assistance big time

Guys and Gals,

 

 

I am trying to do a simple http://owatest.mysite.com to http://owatest.mysite.com/exchange The problem is its not working. Does anyone have an irule handy that can help me??? All help is appreciated.

3 Replies

  • This should do ya:

    
    when HTTP_REQUEST {
     if { ([string tolower [HTTP::host]] == "owatest.mysite.com") and ([string tolower [HTTP::uri]] == "/")} {
      HTTP::respond 301 \
      "Location" "http://owatest.mysite.com/exchange" \
      "Server" "mysite.com"
     }
    }
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    You could also try the obvious HTTP::redirect command using the same "if" syntax as above.

    
    when HTTP_REQUEST {
      if { ([string tolower [HTTP::host] ] equals "owatest.mysite.com" ) and ( [ string tolower [HTTP::uri] ] equals "/") } }
        HTTP::redirect "http://owatest.mysite.com/exchange"
      }
    }

    I'm guessing this is what you're trying though, right? And something still isn't working? Can you provide any more details around the problem you're having?

    Thanks,

    Colin
  • Posted By Colin on 06/18/2007 12:53 PM

    You could also try the obvious HTTP::redirect command using the same "if" syntax as above.

    
    when HTTP_REQUEST {
      if { ([string tolower [HTTP::host] ] equals "owatest.mysite.com" ) and ( [ string tolower [HTTP::uri] ] equals "/") } }
        HTTP::redirect "http://owatest.mysite.com/exchange"
      }
    }

    I'm guessing this is what you're trying though, right? And something still isn't working? Can you provide any more details around the problem you're having?

    Thanks,

    Colin

    The above (HTTP::redirect) will send a 302 (temp), yes?

    Both should work, I usually like to use 301's but you are probably correct to use a temporary redirect instead of a permanent in this case.