Forum Discussion

Zabeel_101104's avatar
Zabeel_101104
Icon for Nimbostratus rankNimbostratus
Mar 29, 2012

url control based on requests/path

Hi,

 

 

Need some help on irules please.

 

 

We have irules defined on the F5 where the string is matched and request sent to a pool

 

 

"mywebsite.com" { pool website1 }

 

 

What I am trying to achieve is

 

 

anyone going to https://thiswebsite.com gets sent to https://thiswebsite.com/webdesktop

 

 

but if anyone types in https://thiswebsite.com/webconsole/app this gets passed along as is to the pool and everything else goes to https://thiswebsite.com/webdesktop

 

 

Regards

 

 

Zabeel.

2 Replies

  • Hi Zabeel,

    I can't see how rewriting ever URI except /webconsole/app to /webdesktop would work, but here's what should do that:

    
    ...
    "mywebsite.com" { 
       pool website1
       switch -glob [HTTP::uri] {
          "/webconsole/app*" {
              do nothing
          }
          default {
              Rewrite URI to /webdesktop
             HTTP::uri "/webdesktop"
          }
       }
    }
    

    Aaron