Forum Discussion
Indrajit_Basak_
Nimbostratus
Feb 04, 2014Need help of I-rule rewrite
Need Help on HTTP rewrite i-rule
Actual server is listening on port 7778 .I created pool of two real servers listening on port 7778
But when the user type http://lmjedwmsaphchh.jeddah.cpksa.loca...
Kevin_Stewart
Employee
Feb 04, 2014At a minimum there's an iRule syntax issue:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] starts_with "lmjedwmsaphchh.jeddah.cpksa.local" } {
HTTP::header replace Host "lmjedwmsaphchh.jeddah.cpksa.local:7778"
}
}
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::header replace Location [string map {"lmjedwmsaphchh.jeddah.cpksa.local:7778" "lmjedwmsaphchh.jeddah.cpksa.local"} [HTTP::header Location]]
}
}
This will account for the incoming Host header and any outgoing redirect Location headers. If it still doesn't work, I'd do a capture of the traffic on the client side to see if other :7778 references are getting through to the client (ie. document object references).
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