http redirect based on active pool name

Hello,

I am new to scripting iRules on the BigIP. I am looking for a rules to redirect to a non-secure URL when the default pool is set to a specific name.

for example:

when HTTP_REQUEST {

if [pool equals pool_name_here]

HTTP::redirect “http://www.urlgoeshere.com”

}

}

Should this be as simple as it sounds? Please advise.

Thanks,

Bryce Johnson

You might want to post this over on the iRules forum. iControl is our remote management API.

-Joe

There is no way to directly extract the default pool from the config with a rule.

You could instead specify a fallback host in the virtual definition, then remove the pool as a resource when you want to force the redirect.

/deb