im having problems with issuing a 302 with an iRule
Im brand new to iRules. so go easy on me :)..I have a production URL http://environment.company.com/ and I created a data group which contains 4 unique URI paths ...
My goal was if traffic comes into the production URL .. and the URI starts_with the paths in my datagroup I wanted to issue a 302 and ask end users browser to come back on a new URL while preserving their URI path.
my datagroup consists of :
/lorl/
/jc.app.settings.svc.webhost/
/jc.leader.joe.webhost/
/jc.app/settings.svc.webhost/
so when a browser hits http://environment.company.com/lorl/ i want them to get a 302 redirecting them to http://new-environment.company.com/lorl
this is what i wrote:
when HTTP_REQUEST { if { [class match [[string tolower [HTTP::uri]] starts_with DatagroupNAME ]] } { HTTP::respond 302 location "http://new-enviornment.company.com[HTTP::uri]" } }
my end user simply gets a connection reset...