Forum Discussion

Tony_Lee_73702's avatar
Tony_Lee_73702
Icon for Nimbostratus rankNimbostratus
Oct 13, 2005

HTTP rewrite for lots of URLs

Hi all,

 

 

I've got a pair of 3400s running 9.0.5. I've created a HTTP-based VS load balancing traffic against a handful of IIS servers.

 

 

I'm in a web hosting environment and I've got a situation where I need to do URL rewrites for the each customer on the BigIP.

 

 

http://www.A.com/ ---> http://www.IIS_node.com/A

 

http://www.B.com/ ---> http://www.IIS_node.com/B

 

.

 

.

 

etc (there's a *significant* number of customers... at least 100)

 

 

I thought of using the following iRule and I want to see if it made sense.

 

 

-------------

 

when HTTP_REQUEST {

 

set http_host HTTP::host

 

switch http_host {

 

"www.A.com" {HTTP::redirect "http://www.my_vs.com/A/"}

 

"www.B.com" {HTTP::redirect "http://www.my_vs.com/B/"}

 

}

 

}

 

-------------

 

 

Thanks - AJ

12 Replies