Forum Discussion

mayur_m_150368's avatar
mayur_m_150368
Icon for Nimbostratus rankNimbostratus
May 15, 2014

Need help for creating datagroup with Irule.

We have published https://abc.com/suites/app URL through F5 on 443 port. When we try to access this URL, it open the front page(Login page) for username & password but when we enter credentials & try to go further, it shows internet explorer page not found error. But at the same time if we re-enter the url “/suites/app “ in the same URL, it login successfully into the site & run smoothly the rest part & again the same issue we get while log off the URL.

 

The same URL is running fine when we published through ISA. So it means there is no issue from web server or URL end.

 

To publish this URL, we have written the below Irule & it has fully tested from end user. The only issue which we are facing while is we need to force fully /re-enter the header after login & log out the URL.

 

when HTTP_REQUEST { SSL::disable if { [string tolower [HTTP::host]] equals "abc.com" } { if { [HTTP::uri] contains "cvapweb" } { pool abc_Pool_9090 } else { pool abc_Pool_8080 } }

 

Working :- Case 1:- If any request hits to (abc.com) virtual IP it should redirect to 8080 pool & Case 2:- If "/cvwebap" word comes in URL it should route to 9090 pool.

 

To resolve this issue we are tring to create datagroup with irule. So can someone please help me to resolve it. Also Do we have any other way to resolve this issue?

 

2 Replies

  • when HTTP_REQUEST { set httpuri [string tolower [getfield [HTTP::uri] "/" 2]] if {[class match $httpuri eq my_datagroup]} {pool abc_Pool_9090} else { pool abc_Pool_8080 } }

     

    -With the above create a datagroup with name my_datagroup - type string and add "cvapweb" as value.

     

    This being said...your initial problem needs to be looked at as well. Try capturing packets or if your application needs persistence just enable it.

     

  • Arie's avatar
    Arie
    Icon for Altostratus rankAltostratus

    I noticed that you're converting HTTP::host to lowercase before doing the string comparison, but you're not doing it for HTTP::uri.