For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Ravindra's avatar
Ravindra
Icon for Nimbostratus rankNimbostratus
Sep 13, 2017

URL redirection with Variable field Dynamic content

I am trying to create a irule on F5 for below redirection where dynamic variable field in actual url should get replaced dynamically. I need this urgently. kindly help.

 

Currently on NGINX apache has below rewrite rule which replaces (.*) with $1 dynamically with exact content like index.php with index.php.

 

Actual URL :http:abc.xyz.com:8080/delivery/(.*)

 

Redirected URL :http://cde.xyz.com:8585/reloadconfig/delivery/$1

 

eg.if Actual URL :http:abc.xyz.com:8080/delivery/index.php

 

Redirected URL :http://cde.xyz.com:8585/reloadconfig/delivery/index.php

 

1 Reply

  • Hi Guy,

    Use this irule:
    if { [HTTP::host] equals "abc.xyz.com:8080" && [HTTP::uri] starts_with "/delivery/" }
    {
        HTTP::redirect "http://cde.xyz.com:8585/reloadconfig[HTTP::uri]"
    }