Forum Discussion

Mitesh_Mistry's avatar
Mitesh_Mistry
Icon for Nimbostratus rankNimbostratus
Aug 23, 2019

Jet Nexus Config to Local Policy or iRule

$path = http.getPath();

 

if( string.endsWithI( $path, "/gem/gem/authenticateUser.gwt"))pool.use("pool_aps");

 

There are a number of these i need to convert from Jet Nexus config to either iRULE or if possible to Local policy.

 

Please can anyone assist, i don't know how to get path using the Local policy but the other elements looks fairly straight forward.

3 Replies

  • the iRule is:

    when HTTP_REQUEST {
    	if { [HTTP::path] eq "/gem/gem/authenticateUser.gwt" }
    	{
    		pool pool_aps
    	}
    }
  • ...or Policy

    ltm policy /Common/test_net {
        controls { forwarding }
        requires { http }
        rules {
            gem {
                actions {
                    0 {
                        forward
                        select
                        pool /Common/pool_aps
                    }
                }
                conditions {
                    0 {
                        http-uri
                        path
                        values { /gem/gem/authenticateUser.gwt }
                    }
                }
            }
        }
        strategy /Common/first-match
    }