iRule redirect from sports.test.co.uk/ioks/* to www.test.co.uk/ioks/*
Hi I wonder if you can assist me on this. I need to write an iRule to redirect incoming traffic from sports.test.co.uk/ioks/* to www.test2.co.uk/ioks/*
The VIP has already an iRule redirection on it for something else. So shall I just modify the existing iRule by inserting a new statement or shall I create another iRule (not sure if two different redirection iRules can exist on the same VIP).
Please advise, below are the statements please let me know if they are correct? Many thanks
OPTION 1: Modify existing Irules insert
elseif {[HTTP::uri] starts_with "/ioks/"} { HTTP:: respond 301 Location "www.test2.co.uk/ioks/" log local0. "This is iojs [HTTP::uri]"
}
OPTION 2: Create a new Irule
when HTTP_REQUEST { if {[HTTP::uri] starts_with "/ioks/"} { HTTP::redirect "www.test2.co.uk/ioks/"} }