vADC Forum

Reply
Brocadian
Posts: 4
Registered: ‎07-09-2015

vADC Traffic script rules for redirection

Hello Guys,

 

I am trying to perform redirection for the below link ,

 

www.prod.com/PSFT/peoplesoft/tsre/xyz.html

 

to 

 

www.test.com/PSFT/HRsoft/tsre/xyz.html

 

Notice that i am trying to change

1)the hostname (prod to test)

2)one  component of the url path(peoplesoft to HRsoft)

How can i achieve this with TS. i tried http.changesite but then it does not work for me since it just changes the hostname and preserves the URL. 

 

Any thoughts ? 

 

 

Brocadian
Posts: 4
Registered: ‎07-09-2015

Re: vADC Traffic script rules for redirection

Frequent Contributor
Posts: 95
Registered: ‎03-23-2015

Re: vADC Traffic script rules for redirection

Hey @karthikheb_heb,

 

I found this: "HowTo: Redirect HTTP clients" in our documents section. Hopefully it will help.

Dennis Smith
Manager Brocade Communities
@DennisMSmith
Brocadian
Posts: 103
Registered: ‎04-22-2015

Re: vADC Traffic script rules for redirection

Were you able to solve this one? As Dennis said, there are a few articles on path inspection and redirection on the community .You should be able to set up something like 

 

if( string.contains( $path,"PSFT/peoplesoft/tsre" ){
   $path = string.replace( $response, "PSFT/peoplesoft/tsre", "PSFT/HRsoft/tsre" );
   http.setPath( $path );

}

 

There are other string.replace() and setPath() combinations which you could use, but they should then hep you ChangeSite() - also if you are also managing both prod.com and test.com on the same vTM, then you may also be able to set rules on test.com to set the URL change after the redirection, if yoiu prefer to keep them as separate actions.

 

Join the Community

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