Forum Discussion

AlbertoCarlone_'s avatar
AlbertoCarlone_
Icon for Nimbostratus rankNimbostratus
Nov 27, 2017

iRule: redirect from port to port with same "/path"

Hi all, i just need to redirect from to

 

i've tried when HTTP_REQUEST { HTTP::redirect "http://[HTTP::host]:8901[HTTP::uri]" }

 

but it does not work as planned.

 

2 Replies

  • Hi, what doesn't work? Does the iRule compile? If so, does it give you an error message?

     

  • Please try below irule & see the log in F5 & modify the iRule accordingly. Hope it will help.

            when HTTP_REQUEST {
                log local0. "http://[HTTP::host]:8901[HTTP::uri]" 
                HTTP::redirect "http://[HTTP::host]:8901[HTTP::uri]"
                }
    

     cat ltm | grep 'url_name'