Forum Discussion
kupaloid_50119
Nimbostratus
Oct 05, 2011Dynamic redirect
Hi, I am a newbie to irule and can only do basic redirect. But we have a requirement for dynamic redirect. Can someone help?
http://www.abc.com/test/[placeholder]
permanent red...
nitass
Employee
Oct 05, 2011or if u wanna match host name as well.
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "www.abc.com" and [string tolower [HTTP::uri]] starts_with "/test"} {
HTTP::redirect "http://abc.123.net/dc?purl=[string range [HTTP::uri] 6 end]"
}
}
}
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