ppater_73099
Jul 08, 2013Nimbostratus
URL forward
Hello,
Can someone help me with creating an irule?
I want to foward the following.
http://www.example.com/test1
to
http://test1.example.com
Thanks
Best Regards
Patrick
Hello,
Can someone help me with creating an irule?
I want to foward the following.
http://www.example.com/test1
to
http://test1.example.com
Thanks
Best Regards
Patrick
Redirects, Rewrites and App Transfers via iRules by Colin Walker
https://devcentral.f5.com/tech-tips/articles/redirects-rewrites-and-app-transfers-via-irules
it has to be an redirect
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { [HTTP::host] eq "www.example.com" and [HTTP::uri] eq "/test1" } {
HTTP::redirect "http://test1.example.com"
}
}
}
[root@ve10:Active] config curl -i http://www.example.com/test1
HTTP/1.0 302 Found
Location: http://test1.example.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
Thank you Nitass! This works for me :)
Best Regards
Patrick