Forum Discussion
Durga_Dash_2124
Nimbostratus
May 20, 2008Redirect to URL
I want to be able to write an iRule that will redirect traffic from the virtual server to an IP address which has its first three octets fixed but the last octet comes from the last octet of the virtu...
Colin_Walker_12
May 20, 2008Historic F5 Account
I think what you're looking for is:
when HTTP_REQUEST {
log local0. "in HTTP_REQUEST"
if { matchclass [IP::local_addr] equals $::TenFiftyZeroSubnet } {
HTTP::redirect http://10.40.40.[getfield [IP::local_addr] . 4][HTTP::uri]
}
}
This will grab the last octet of the incoming IP address and keep it static, while updating the first 3 octets to the new address.
Hope this helps,
Colin
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
