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, 2011that's fine.
[root@tulip:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[string tolower [HTTP::uri]] starts_with "/test"} {
HTTP::redirect "http://abc.123.net/dc?purl=[string range [HTTP::uri] 6 end]" }
}
}
[root@tulip:Active] config curl -I http://www.abc.com/aaaaaa/bbbbb/cccccc
curl: (52) Empty reply from server
[root@tulip:Active] config curl -I http://www.abc.com/test/abc
HTTP/1.0 302 Found
Location: http://abc.123.net/dc?purl=abc
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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