Forum Discussion
Randy_Johnson_1
Nimbostratus
Nov 29, 2006Question on (what should be) a simple redirect -
Hi, group-
I have a set of URLs I'd like to redirect. My rule looks like this -
when HTTP_REQUEST {
log local0. "Checking URI [HTTP::uri] from [IP::client_addr] for insecure cal...
Randy_Johnson_1
Nimbostratus
Nov 29, 2006You're correct about the URI logged being /fooserver/foo.
What I'm trying to do is if someone accesses the URI /fooserver/foo, on the virtual server this rule is applied to, then redirect them to a different URL.
I altered the rule to reflect the correct URI, but redirection does not occur.
when HTTP_REQUEST {
log local0. "Checking URI [HTTP::uri] from [IP::client_addr] for insecure calls to some server"
if { [string tolower [HTTP::uri]] equals "/fooserver/foo"} {
HTTP::redirect "https://redirect.somedomain.net"
log local0. "Request for [HTTP::uri] from [IP::client_addr] is being sent to the other site"
}
}
Thanks for your help !
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects