Forum Discussion

Dave_Lee_20197's avatar
Dave_Lee_20197
Icon for Nimbostratus rankNimbostratus
Jun 23, 2005

close but no cigar

I need ssl on uri /test, test1 and test2 but not on the home page or uri /citrix. I made Class uri1 string - /test, /test1, and /test2. this is the rule I want to use.

 

if (http_uri starts_with one of uri1) {

 

redirect to "https://home.com else {

 

use pool home_pool

 

}

 

This rule seem to work but when I click on the on the link for /test it take me to the https://home.com then I reclick on the link and I get to https://home.com/test. Should I be able to go directly to https://home.com/test, test1, test2 without going to https://home.com?

 

 

Thanks,

 

Dave

3 Replies

  • bknotwell_12713's avatar
    bknotwell_12713
    Historic F5 Account
    I'm not exactly sure what you're asking, but I think you want the following:

     

     

    redirect to "https://home.com/%u"

     

     

    Good luck!

     

     

    --Brad
  • Colin_Walker_12's avatar
    Colin_Walker_12
    Historic F5 Account
    Dave,

     

     

    It looks as though the rule is working the way you've set it up. If you look at the rule, the behavior you're seeing is completely proper.

     

     

    On the first request, it checks the http_uri and finds that the URI matches one of the URIs in the class you created. This redirects the user to "https://home.com", as defined by your rule.

     

     

    Perhaps you'd see the desired behavior if the rule read something like:

     

     

    if (http_uri starts_with one of uri1) {

     

    redirect to "https://home.com/%u else {

     

    use pool home_pool

     

    }

     

     

    This would perform the same redirect to https, but it would allow the URI of the request to carry over.

     

     

    For instance, instead of ending up at https://home.com after the rule catches the URI that matches your class, you'd end up at https://home.com/test (or /test1, /test2, etc...). This way you wouldn't have to click the link again.

     

     

    Hopefully this clears things up...

     

     

    -Colin