vADC Forum

Occasional Contributor
Posts: 8
Registered: ‎11-04-2013

Traffic Script - Change a POST url?


I am new to Riverbed Traffic Scripts.  What i need to do is change the post URL that someone is trying to POST to.  I am probably not explaining it correctly.

When the customer does a GET from our web server the packet capture shows just the query string:

GET /Test_Page/Testing_Page_ID.aspx?trx_id=DFT12345678901234567890&token=8zxc4v85bnmas3005216

But when i see the POST (they are going to post some XML.  I am seeing the following:


We are then returning a 404 (not that i can see this on the IIS server logs, so i am guessing the STM is returning it, but i might be wrong?

Is there a way using a traffic script to remove the first part of it and just use the query string to fo the POST?

Thanks in advance for your help


Posts: 22
Registered: ‎05-21-2013

Re: Traffic Script - Change a POST url?

Hi Martin,

You might want to take a look at these examples : HowTo: Inspect HTTP request parameters

Specifically these variables :

$rawurl    = http.getRawURL();      # returns '/search?hl=en&q=ZXTM&btnG=Google+Search'

$path        = http.getPath();        # returns '/search'

$querystr = http.getQueryString();  # returns 'hl=en&q=ZXTM&btnG=Google+Search'

Best regards


Occasional Contributor
Posts: 8
Registered: ‎11-04-2013

Re: Traffic Script - Change a POST url?

Hi Bjarke,

Thank you for your response it helped me come up with the following script to fix the problem:



$url = http.getRawURL();

# Rewrite Path to remove the IP Address

if( string.contains( $url , "" ) ||

    string.contains( $url , "" )

) {

   http.setPath( "Test_Page/Testing_Page_ID.aspx" );


Thanks again


Join the Community

Get quick and easy access to valuable resource designed to help you manage your Brocade Network.