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

Zangfro_170494's avatar
Zangfro_170494
Icon for Nimbostratus rankNimbostratus
Sep 16, 2014

New to iRULES and F5 -- URL rewrite question

Handed responsibility of managing our F5s and trying to write the following rewrite either with iRules or HTTP Class Profile, we are running 11.3

 

If https://xxx.xxx.ourdomain.com/ABCGamePlay/?softwareid=302221-01-001&RealPlay=0&countrycode=NA&language=en&nogsoperatorid=123 This should redirect to https://xxx.xxx.ourdomain.com/DEFGamePlay/?softwareid=302221-01-001&RealPlay=0&countrycode=NA&language=en&nogsoperatorid=123

 

Not sure if i have to include the full URI in the rewrite or just the first part /ABCGamePlay to DEF/GamePlay

 

2 Replies

  • Try this:

    when HTTP_REQUEST {    
        if { [string tolower [HTTP::uri]] starts_with "/abcgameplay" } {        
            set uri [string map -nocase {"/abcgameplay" "/defgameplay"} [HTTP::uri]]            
            HTTP::redirect "https://[HTTP::host]${uri}"
        }
    }
    
  • Kevin,

     

    Thank you for the quick response, I'm trying to get up to speed on all this

     

    I'll go ahead and give this a try.

     

    Appreciate it.