Need Irule for redirection

I am a Newbie for irules need help

I have a request to redirect host --->

Any pointers would be much appreciated.

when HTTP_REQUEST {
if { ([HTTP::host] eq "www.f5.com") and ([string tolower [HTTP::uri]] eq "/dev") } {
HTTP::respond 301 Location "http://www.f5.com/"
}
}

Try something like the iRule provided above.