Forum Discussion
F5Zan_89516
Nimbostratus
Jan 07, 2014irule not working as expected
Hi, i have a simple redirection irule which is not working . Here it is
when HTTP_REQUEST {
if { [HTTP::host] equals "cmsint-qa.abc.com/public/header.html?SiteId=GCR"}
{
HTTP::redirect "https:/...
nitass
Employee
Jan 07, 2014e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.20.15:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 34
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] equals "cmsint-qa.abc.com" and [HTTP::uri] equals "/public/header.html?SiteId=GCR" } {
HTTP::redirect "https://gcr-qa.abc.com[HTTP::uri]"
}
}
}
test
[root@ve11a:Active:In Sync] config curl -I http://172.28.20.15/public/header.html?SiteId=GCR -H "Host: cmsint-qa.abc.com"
HTTP/1.0 302 Found
Location: https://gcr-qa.abc.com/public/header.html?SiteId=GCR
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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