Forum Discussion

O2_Support_6853's avatar
O2_Support_6853
Icon for Nimbostratus rankNimbostratus
Mar 22, 2012

i-rule for URI re-write

Greetings Fellas!

 

 

I`m new to world of i-rules.

 

 

I`m required urgent help from you champions on writing an i-rule to replace \subscription-services from URI with \subscription-services2.

 

 

For example :

 

xyz.abc.com.au/subscription-services/* should resolve to

 

 

Any help much appreciated!

 

 

Cheers,

 

  • Hi,

    Can you try this?

    
    when HTTP_REQUEST {
    
    if {[HTTP::path] starts_with "/subscription-services/"}{
    HTTP::path [string map {/subscription-services/ /subscription-services2/} [HTTP::path]]
    }
    }
    

    Aaron