Forum Discussion

Patrick_Dong_70's avatar
Patrick_Dong_70
Icon for Nimbostratus rankNimbostratus
Sep 26, 2005

Redirect from hostname to application

Hi,

 

 

I want to write a rule in our big ip as below:

 

 

if (http_uri == "/")

 

{

 

redirect to "http://%h/myapp"

 

}

 

else

 

{

 

use pool mytestpool

 

}

 

 

The function I want the script has is:

 

 

 

1. if customer uses url "http://www.myhost.com", then the request will be redirected automatically to: "http://www.myhost.com/myapp"

 

 

2. if custoemr uses url "http://www.myhost.com/anyapp", then the request will be sent to the pool mytestpool.

 

 

My question is:

 

 

will http_uri is "/" for url http://www.myhost.com?

 

Is this rule correct for this requirement?

 

 

It is a production system and we have very little chance to test and play around in our own system. So please take a look and advice.

 

 

Thanks and regards,

 

 

Patrick Dong