Forum Discussion

Joe_48617's avatar
Joe_48617
Icon for Nimbostratus rankNimbostratus
Oct 11, 2007

redirect from virtual server to a specific url

How do I do this...

 

 

I have a set of domains pointing at an IP number and right now on my v4 system I am able to create a virtual server that listens on port 80 and using an irule redirect to a correct url for the domain. However on my new v9 system after I translated the rule it no longer works

 

 

the path is something like this http://www.nebraskatransplant.org/ goes to 192.198.54.xxx the load balancer sees that request and redirects it to http://www.nebraskamed.com/transplant/

 

 

v4

 

if (http_uri ends_with one of unmc_extends or http_method == one of unmc_methods or http_uri contains one of unmc_sql or client_addr == one of unmc_restrict_ips or http_uri contains "%20and%20") {

 

discard

 

}

 

else {

 

redirect to "www.nebraskamed.com/transplant/"

 

}

 

 

v9

 

when HTTP_REQUEST {

 

if {[matchclass [HTTP::uri] ends_with $::unmc_extends] or

 

[matchclass [HTTP::method] equals $::unmc_methods] or

 

[matchclass [HTTP::uri] contains $::unmc_sql] or

 

[[HTTP::uri] contains "%20and%20"] or

 

[matchclass [IP::client_addr] equals $::unmc_restrict_ips]}{

 

discard

 

} else {

 

HTTP::redirect "http://www.nebraskamed.com/transplant/"

 

}

 

}

 

 

or should I be doing something completely different in the v9 environment ?

 

 

Thanks for your help.

 

 

No RepliesBe the first to reply