Forum Discussion
sysadmin_2015_2
Nimbostratus
Jul 17, 2018iRule - Switch IP to Host Name
Hello,
We have a special case were we have a customer sending traffic by IP instead of host name. Instead of https://test.f5.com/api/example there hitting us as https://37.123.55.109/api/exampl...
nathe
Cirrocumulus
Jul 17, 2018Would this irule help?
when HTTP_REQUEST {
if { ( [HTTP::host] eq "37.123.55.109" ) and
( [HTTP::uri] starts_with "/api/example" ) } {
HTTP::respond 301 Location "https://test.f5.com[HTTP::uri]"
}
}
Not got my lab fired up so would need to verify syntax and test.
Hope this helps,
N
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
