301 re-director

Hi,

I have a 301 re-director iRule in place to re-direct certain URIs to a landing page.

if { [matchclass [HTTP::uri] equals $::redirector301_to-Landingpage_datagroup_prod] }{

log local0. “redirecting to URI: [HTTP::uri]”

set location “http://www.landingpage.com/”

This works fine.

I am using a Datagroup list to catch the traffic i.e.

class redirector301_toHomepage_datagroup_prod {

“/search*”

This catches search but not any of the links after search like search/index.htm etc.

Is this the correct way to go about re-directing these?

I don’t want to have to put in each explicit URI.

Tks,

D

What if using this condition:

if {[matchclass [HTTP::uri] starts_with $::redirector301_toHomepage_datagroup_prod]}

The class:

class redirector301_toHomepage_datagroup_prod {

“/search”

}