Forum Discussion

jeffrey1984's avatar
Sep 16, 2019

Irule redirecting full path url to another url

I am kind a newbie on the irule configurations . We have a full path url like https://test.abc.com/psp/ps/?tab=ABDC_GUEST . We wanted to do a redirection for that url so if a user click that link they will be redirected to a new url like https://prod.abc.com/psp/ps/?cmd=login . Is there a best way to accomplished this type of scenario . Thanks in advance

2 Replies

  • use his iRule :

    when HTTP_REQUEST {
    	if { ([string tolower [HTTP::host]] eq "test.abc.com") && ([string tolower [HTTP::uri]] eq "/psp/ps/?tab=abdc_guest") }
    	{
    		HTTP::redirect "https://prod.abc.com/psp/ps/?cmd=login"
    	}
    }
  • Hi Jeffrey,

     

    I advise you to use LTM Policy.

    It's simple to use and maintain especial for this king of need.

     

     

    regards