Forum Discussion

JPONNUSAMY_2705's avatar
JPONNUSAMY_2705
Icon for Nimbostratus rankNimbostratus
Aug 11, 2016

iRule to hide folders for users but internally it should call appropriate folder

Hi All,

 

We have requirement to hide some of the subfolders from the URL on browser but internally it should work. After /sites/ en_US comes then we have to completely hide from the browser internally. At the same time, After /sites/ ar_QA comes then we have to change it to ar.

 

For example: Change1: Actual URL: http://cmspweb.com/sites/en_US/xxx/yyy Expecting URL: http://cmspweb.com/sites/xxx/yyy Change2: Actual URL: http://cmspweb.com/sites/ar_QA/xxx/yyy Expecting URL: http://cmspweb.com/sites/ar/xxx/yyy

 

Kindly please help on this.

 

Thanks Jayaram

 

3 Replies

  • You need to define internal Subnet in class & call from irule to match. Let me know if you want irule

     

  • Hi, Just add internal & external url.

             class datagroup-ntvSamsungSmartTVApp {
                  host 10.10.5.139
                  network 172.16.0.0/16
                     }
    
    
        when CLIENT_ACCEPTED {
         if request comes from internal Client
            if { [class match [IP::client_addr] equals datagroup-ntvSamsungSmartTVApp] } {
              HTTP::redirect "http://cmspweb.com/sites/ar/xxx/yyy"  
             }
             else {
        if subnet doesn't match with datagroup, then redirect to external site.
                HTTP::redirect "http://cmspweb.com/sites/xxx/yyy"
                }
            }