Forum Discussion

kupaloid_50119's avatar
kupaloid_50119
Icon for Nimbostratus rankNimbostratus
Dec 03, 2012

help - irule http redirect

Hi, need some help in creating an irule for http redirect such that www.abc.com will redirect to www.abc.com/new but www.abc.com/test will not be changed

 

I have an existing irule already to redirect '/" to "/new" but have a new requirement for /test not to be changed

 

when HTTP_REQUEST {

 

if { [HTTP::path] equals "/" } {

 

HTTP::redirect "/new/"

 

}

 

}

 

Thanks

 

2 Replies

  • As you are using 'equals' in your if statement I would think your rule will work fine and meet your requirements right now. If the path is /test, it won't match and won't be redirected.