Forum Discussion

swo0sh_gt_13163's avatar
swo0sh_gt_13163
Icon for Altostratus rankAltostratus
Dec 07, 2015

HTTP Class to iRule Migration for 11.4.0 or later.

Hello Folks,

I am working on a migration project for one of the customers who is running 11.2.1 HF8 currently and upgrading to 11.6.0.

I have converted most of the HTTP Classes/iRule for 11.6.0 however there is one iRule is causing trouble.

Current HTTP Class looks as following.

paths { 
/geoportal(/.*)\? 
/arcgis(/.*)\? 
/directories(/.*)\? 
/mapviewer(/.*)\? 
/mapviewerar(/.*)\? 
/mapviewerbeta(/.*)\? 
/geoportalbeta(/.*)\? 
/proxy(/.*)\? 
/arcgis_js_api(/.*)\? 
/ogc(/.*)\? 
/tokenservice(/.*)\? 
/rest(/.*)\? 
/OntologyService(/.*)\? 
/services(/.*)\? }
pool /Common/SDI_Pool_8085

Since the HTTP Path needs to be defined which matches the regex, I couldn't make further progress. Can anyone help me to configure an iRule to achieve the above?

Any help will be highly appreciated.

Thanks, Darshan

1 Reply

  • Hello Folks,

    I was trying to configure an iRule to match above. I have end up with the following. Can anyone confirm if this would work as a replica of above?

    when HTTP_REQUEST {
        switch -regexp [HTTP::path] {
            "/geoportal(/.*)\?"
            "/arcgis(/.*)\?"
            "/directories(/.*)\?" 
            "/mapviewer(/.*)\?"
            "/mapviewerar(/.*)\?" 
            "/mapviewerbeta(/.*)\?" 
            "/geoportalbeta(/.*)\?" 
            "/proxy(/.*)\?" 
            "/arcgis_js_api(/.*)\?" 
            "/ogc(/.*)\?"
            "/tokenservice(/.*)\?" 
            "/rest(/.*)\?"
            "/OntologyService(/.*)\?" 
            "/services(/.*)\?" }
            pool Test_Pool
        }
    

    Above iRule doesn't show any syntax errors, however if someone can confirm if this would serve the purpose or not, would be a great help.

    Thanks folks!