Forum Discussion

Gill_32697's avatar
Gill_32697
Icon for Nimbostratus rankNimbostratus
Feb 13, 2014

edit irule to display page root and sub folders folder

This is my current iRule, it works except that the default page is not displaying all the icons, links etc. Developers says its because the default webpage contains root sub folders that need to be definded in the irule. Below are the links and also my irule. I think this is the last piece I need to fix. Doing this cutover tonight so Im in a tight spot if you would please help.. ! !! THESE ARE THE LINKS THE DEFAULT PAGE CANT SEE, i think these can be trimmed with * i think. ! http://www.imortgage.com http://www.imortgage.com/MortgageLoanOptions.aspx

 

http://www.imortgage.com/mortgageloanoptions/conventionalmortgageloans.aspx http://www.imortgage.com/mortgageloanoptions/vamortgageloans.aspx http://www.imortgage.com/mortgageloanoptions/fhamortgageloans.aspx http://www.imortgage.com/mortgageloanoptions/homepathmortgageloans.aspx http://www.imortgage.com/mortgageloanoptions/jumbomortgageloans.aspx http://www.imortgage.com/mortgageloanoptions/usdaruraldevelopmentmortgageloans.aspx http://www.imortgage.com/Portals/5/Documents/Loan-Application-Checklist.pdf http://www.imortgage.com/Portals/5/Documents/How-Much-Home-Can-You-Afford.pdf http://www.imortgage.com/Portals/5/Documents/9-Things-You-Should-Do-When-Looking-For-A-New-Home.pdf http://www.imortgage.com/Portals/5/Documents/Principal-And-Interest-Payment-Guide.pdf

 

http://www.imortgage.com/Portals/5/Documents/glossary-of-mortgage-terms.pdf

 

http://www.imortgage.com/MortgageResourceCenter.aspx http://www.imortgage.com/mortgageresourcecenter/mortgageloanprocess.aspx http://www.imortgage.com/mortgageresourcecenter/mortgageloanservicingfaqs.aspx http://www.imortgage.com/mortgageresourcecenter/mortgageloanprocessingfaqs.aspx http://www.imortgage.com/ContactUs.aspx http://www.imortgage.com/contactus/imortgagelocations.aspx http://www.imortgage.com/contactus/contactyhankyoupage.aspx http://www.imortgage.com/About.aspx http://www.imortgage.com/Admin.aspx http://www.imortgage.com/Admin/ http://www.imortgage.com/Host/ ! !! THIS IS MY IRULE ! when HTTP_REQUEST { if { [HTTP::uri] equals "/" } { return } else { if { [class match [string tolower [HTTP::uri]] starts_with Mortgage_iRuler] } { HTTP::redirect [class match -value [string tolower [HTTP::uri]] starts_with Mortgage_iRuler] } else { node 10.13.0.59 } } }

 

  • Put the following values into a separate string-based data group (ex. uri_dg):

    /mortgageloanoptions 
    /portals/5/documents
    /mortgageresourcecenter
    /contactus 
    /about 
    /admin 
    /host
    

    And then modify this iRule as required:

    when HTTP_REQUEST { 
        if { ( [HTTP::uri] equals "/" ) or ( [class match [string tolower [HTTP::uri]] starts_with uri_dg] ) } { 
            return 
        } else { 
            if { [class match [string tolower [HTTP::uri]] starts_with Mortgage_iRuler] } { 
                HTTP::redirect [class match -value [string tolower [HTTP::uri]] starts_with Mortgage_iRuler] 
            } else { 
                node 10.13.0.59 
            } 
        } 
    }
    
  • looks alot better but now its skipping over the URI data group starts_with Mortgage_iRuler.

     

  • If you've put those URI patterns into a separate data group, and the user requests "/sue", then it should definitely be dropping into the Mortgage_iRuler data group - because the URI doesn't equals "/" and doesn't start with a value in the uri_dg data group. You may otherwise need to refine the URIs in the uri_dg data group.