irule to change port

I am writting an irule to the url to a different port based on data group membership. I have the below irule but cant get it to work.

this irule inspects the client IP and compares it to a data group, if the client IP is specified then the URL is redirected

when HTTP_REQUEST {

if the subnet matches what is in the data group the the host portion of the URL is redirected and the URI is appended

if { [class match [IP::client_addr] equals website-pilot-dg] } { HTTP::redirect [HTTP::host] “:82” [HTTP::uri] } }

I tried selecting a different pool but that didnt work either

if { [class match [IP::client_addr] equals website-pilot-dg] } { pool website-port } }

I figured it out I need to use a different pool and enable port translation