vADC Forum

Reply
Contributor
Posts: 22
Registered: ‎05-21-2013
Accepted Solution

Hint to get started on Traffic Script with a 'split' pool

I have got the following task from the DEVs.

- original DNS / URL ( example.com ) should be AS-IS.

- example.com/new-site should be hosted by another pool.

- example.com/everything-else should be AS-IS.

More specific, the original site has IIS/ASP.Net on the backend. The new ( example.com/new-site ) is hosted on a LAMP / WordPress stack... and creating a subsite ( new-site.example.com ) is not preferred.

Any way to achieve this?

Brgds

Bjarke Emborg Kragelund

N/A
Posts: 1
Registered: ‎12-10-2013

Re: Hint to get started on Traffic Script with a 'split' pool

Hi,

$path = http.getpath();

if(string.startsWithI($path,"/new-site")){

   pool.use("newsitepool");

}

else

...

...



Contributor
Posts: 22
Registered: ‎05-21-2013

Re: Hint to get started on Traffic Script with a 'split' pool

Hi Nicolas et al,

Thx for the above.

The plot thickens a bit - If the 'new-site' is only listening on the header 'new-site.com' I need to rewrite the traffic towards the new pool as well.

I will give it go, but if you have some code handy?

Brgds.

Bjarke

Brocadian
Posts: 58
Registered: ‎11-29-2012

Re: Re: Hint to get started on Traffic Script with a 'split' pool


$path = http.getpath();



if(string.startsWithI($path,"/new-site")){



  http.setheader( "Host", "new-site.com" );



  pool.use("newsitepool");



}


Join the Community

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