Forum Discussion
Abhijith_Subban
Mar 19, 2018Nimbostratus
irule based om http request.
I got a requirement as below :
When client hits abc-test-domain.com --- should get translated to dc-abc-test-domain1.com. Could someone give me the syntax please for irule.
oguzy
Cirrostratus
Hi,
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "abc-test-domain.com" } {
HTTP::respond 301 "Location" "http://dc-abc-test-domain1.com"
}
}
Abhijith_Subban
Mar 19, 2018Nimbostratus
If, the listening and responding port is 8080 then during http response header. Can this be done :
when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "abc-test-domain.com" } { HTTP::respond 301 "Location" "[http://dc-test-domain1.com:8080 :8080"](http://dc-test-domain1.com:8080 :8080); } }
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