The
HTTP::host
command will only give the host name ("abc.com"). It won't give your the protocol. So you don't want to use that when you're comparing because it'll never be equal.
Your iRule's logic will work as long as you want any host that has one of the uris specified in the data group to be redirected to def.com. That means that
https://abc.com/uri1
would go to
https://def.com
, as well as
https://def.com/uri1
would be redirected as well.
Are you trying to redirect everything with a specific URI to def.com, or only certain hosts like abc.com?