Forum Discussion

adamp_1459's avatar
adamp_1459
Icon for Nimbostratus rankNimbostratus
Nov 05, 2013

Redirect Irule For a specific URL to a Web Proxy

hey i'm doing LTM formy Wensense-web-proxy, i need an irule that can redirect a specifc web proxy ("connect" request if im not mistaken) to a different web proxy on some hosts, any help would be appreciated

 

6 Replies

  • A bit more information would be useful, but is this what you are after?

    if {[string toupper [HTTP::method]] eq "CONNECT"} {
        pool 
    } 
    
  • i have my default web proxy pool but when a user tries to open for example google.com go to another pool that is a diffren web proxy
  • Try;-

    if {[string toupper [HTTP::method]] eq "CONNECT" && [HTTP::host] starts_with "google.com"} {
        pool 
    } 
    
  • hmm does not compile i was able to change it so but it does not redirect when HTTP_REQUEST { if { [string toupper [HTTP::method]] eq "CONNECT" && [HTTP::host] starts_with "google.com" } { pool second-webporxy } } any ideas?
  • For testing, put in a few logging statements;

    log local0. [HTTP::request]
     if { [string toupper [HTTP::method]] eq "CONNECT" && [HTTP::host] starts_with "google.com"} {
        pool second-webproxy
        log local0. "Selecting pool second-webproxy"
    } 
    

    Then check /var/log/ltm to see your log statements - you should be able to work out where it is going wrong. Also - make sure you have the oneconnect profile assigned to your virtual server so that it examines each request.