Forum Discussion
Ashwini_6674
Aug 08, 2012Nimbostratus
iRule using Sideband
When a user clicks on a pdf (for example), how do I create 2 requests -
One that actually takes the user to that pdf
Second , route the request to a dummy (Cold Fusion) page that has some webtrends Code that tracks the hit to that PDF
Any help is appreciated
- hooleylistCirrostratusHi Ashwini,
- Ashwini_6674NimbostratusAaron,
- hooleylistCirrostratusThere are three examples on the HTTP::retry wiki page:
- Ashwini_6674Nimbostratus
Aaron,
If possible , can you provide me an example specific to my question. I tried working off the examples you provided and it did not work.
Any help is appreciated.
Thanks
- nitassEmployeecan you post your current irule?
- Ashwini_6674NimbostratusSo far, I have only th eirule to redirect to my dummy link, which should not be visible to the user.
- nitassEmployeee.g.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar ltm virtual bar { destination 172.28.19.252:80 ip-protocol tcp mask 255.255.255.255 pool foo profiles { http { } tcp { } } rules { myrule } snat automap vlans-disabled } root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm pool foo ltm pool foo { members { 200.200.200.101:80 { address 200.200.200.101 } } } root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule ltm rule myrule { when HTTP_REQUEST { if {[string tolower [HTTP::path]] ends_with ".pdf"} { if {[catch {connect 200.200.200.102 80} conn_id] == 0 && $conn_id ne ""} { set data "GET /wt.cfm?fileurl=http://[http_host][http_uri] HTTP/1.1\r\nHost: cmspublish.niehs.nih.gov\r\nConnection: Close\r\n\r\n" send $conn_id $data } } } } connection 1 is from client to bigip connection 2 is sideband from bigip to 200.200.200.102:80 connection 3 is from bigip to pool (foo) [root@ve11a:Active:Changes Pending] config ssldump -Aed -nni 0.0 port 80 New TCP connection 1: 172.28.19.251(36480) <-> 172.28.19.252(80) 1349358406.9334 (0.0010) C>S --------------------------------------------------------------- HEAD /dummy.pdf HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Accept: */* Host: www.abc.com --------------------------------------------------------------- New TCP connection 2: 200.200.200.11(32170) <-> 200.200.200.102(80) 1349358406.9357 (0.0010) C>S --------------------------------------------------------------- GET /wt.cfm?fileurl=http://www.abc.com/dummy.pdf HTTP/1.1 Host: cmspublish.niehs.nih.gov Connection: Close --------------------------------------------------------------- New TCP connection 3: 200.200.200.11(36480) <-> 200.200.200.101(80) 1349358406.9368 (0.0010) C>S --------------------------------------------------------------- HEAD /dummy.pdf HTTP/1.1 User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 Accept: */* Host: www.abc.com ---------------------------------------------------------------
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