cancel
Showing results for 
Search instead for 
Did you mean: 

vADC Traffic script rules for redirection

Highlighted
New Contributor

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 ? 

 

 

3 REPLIES
New Contributor

Re: vADC Traffic script rules for redirection

New Contributor

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.

Contributor

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.