requires an associated HTTP or FASTHTTP profile on the virtual-server

Hi,

I get following error after adding the iRule to a vs: 01071912:3: HTTP_REQUEST event in rule (/Common/irule-geo_white) requires an associated HTTP or FASTHTTP profile on the virtual-server (/Common/test-http-dsr-vs).

The iRule should geoblock countries and whitelist some other and give back a video to the geoblocked countires:

when CLIENT_ACCEPTED {
    set redirect 0
    if { [class match [IP::client_addr] equals datagroup-SmartTVApp] } then {
        pool clips-http-dsr-pool
    } else {
        switch -exact -- [whereis [IP::client_addr] country] {
            "DE" -
            "AT" -
            "CH" -
            "LI" -
            "LU" {
                pool clips-http-dsr-pool
            } else {
                set redirect 1
            }
        }
    }
}

when HTTP_REQUEST {
    if {$redirect == 1} {
                    switch -glob [HTTP::path] {
                    "*.f4m"  { HTTP::redirect http://example.de/path/to/video/GEO.f4m}
                    "*.m3u8" { HTTP::redirect http://example.de/path/to/video/GEO.m3u8}
                    default { set file_extension -}   
        }
    }   
}

What am I doing wrong?

You need an HTTP profile on your virtual server.

Just as it says, you need to add the http profile (or an http child profile) to the Virtual Server which is using this iRule. The HTTP specific events do not fire on a flow through a particular Virtual Server unless an http profile is applied to that Virtual Server. HTTP_REQUEST is such an event.

Hi, I changed the profile to http. But unfortunately the virtual server is “dsr”. Do you see any possiblity to build a walkaround?