Forum Discussion
Pedro_Madeira_7
Sep 08, 2008Nimbostratus
youtube.com problem (also with videos.google.com)
Hello everyone,
I'm bit new to F5 technologies and I'm now facing a strange problem that I can't seem to solve so I'm turning to you vets to give me a hand.
I have a cust...
Pedro_Madeira_7
Sep 09, 2008Nimbostratus
Hello guys,
I've been searching some iRules code that I could use to solve this problem. I'm still new to this but I was able to come out with this:
when HTTP_RESPONSE {
if { [HTTP::is_redirect] }{
if {[findstr [HTTP::uri]] contains "85.88.135.19"} {
pool pool1
}else {
pool pool2
}
}
I'm sure the syntax is wrong and I was looking forward if you guys could help me fix the iRule.
Basically my idea is to make the Link controller read the HTTP 303 redirect sent from youtube to the user.
Location: http://v1.cache.googlevideo.com/get_video?video_id=gnZft1YTcA0&origin=ash-v190.ash.youtube.com&signature=CC4D530B3C7758DC76526042C6AD7D8B54352A4C.5629ADFF90E52BCA9E002A8583ACA62C466BCB8C&ip=85.88.135.195&ipbits=8&expire=1220645872&key=yt1&sver=2
In the above line, when the HTTP 303 is issued, youtube informs the user of the location of the video he's trying to get. If you play close attention to the URL, it contains the NAT public IP with which the user left to the internet (lets suppose it's ISP A).
So I wanna make an iRule that is able to read this line, find if the IP used is the nat public IP of ISP A or ISP B and based on the findings, force the user to go to that new location through the same IP as of the original request.
Looking forward to hear from you guys.
Best regards,
Pedro Madeira
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