Forum Discussion

Felix888_164906's avatar
Felix888_164906
Icon for Nimbostratus rankNimbostratus
Sep 24, 2014

A Question about HTTPS redirect

Hello everyone:

   I am struggling with the HTTPS redirecting problem, hopefully someone can help, thanks in advance.
   I have the website: https://www.mydomain.com, below is what I want:
   When peoples access to www.mydomain.com/app/, F5 will redirect to 2 servers (S1 and S2)
   When peoples access to www.mydomain.com/api/, F5 will redirect to other 5 servers (S3-7)
   When people access to www.mydomain.com/cfg/,  F5 will redirect to the same above 5 servers (S3-7)
   All pools and VS have been setup for app,api and cfg with the policy for http uri forwarding, but when I tried to setup the wide ip for www.mydomain.com, I realized I cannot put 2 VS in the GTM for a single DNS record. I am looking for the help as I am not familiar with IRULE or other scripting.

10 Replies

  • When you say redirect do you want a 302 redirect or you just want to traffic to be forwarded to those servers by the BIG-IP?

     

    If its a redirect can you include the destination URL's for all three please.

     

  • Thanks for the reply Kevin. Sorry for the confusion. I want to redirect the graceful page with the base url www.mydomain.com but will need to forward for app, api and cfg through bigip to the servers.

     

    • Kevin_Davies_40's avatar
      Kevin_Davies_40
      Icon for Nacreous rankNacreous
      I read read your updated post. You say you want redirects but you still haven't supplied the destination URL's. So I can only assume you mean you want traffic forwarded to those servers and not redirected using a 302 redirect.
  • when HTTP_REQUEST {
      switch -glob [HTTP::uri] {
        "/app/*" { pool1 }
        "/api/*" -
        "/cfg/*" { pool2 }
      }
    } 
    

    pool1 S1-2

    pool2 S3-7

    Mine you, you dont really need an iRule for this. You can use HTTP classes in 11.3 or earlier and HTTP policies in 11.4 or later to do the same thing.

  • I don't know why I can't see the reply here but only from my email...

     

    Kevin, I forgot to mention that I need https traffic from bigip to the backend server.

     

  • All of the above will work with HTTPS. Just make sure you have clientssl and serverssl profiles. Try a different browser if you cant see the article here.

     

  • the destination URL is www.mydomain.com/app
                           www.mydomain.com/api
                           www.mydomain.com/cfg
    
                           Thanks
    
  • Felix888,

     

    so you are saying you want to redirect from www.mydomain.com/app/ to www.mydomain.com/app ?

     

    Doesn't make a lot of sense. You need to tell what you are coming from and going to.

     

  • Hi Kevin: That's what I mentioned in the first post. This is what I want to achieve: When peoples access to www.mydomain.com/app/, F5 will redirect to 2 servers (S1 and S2) When peoples access to www.mydomain.com/api/, F5 will redirect to other 5 servers (S3-7) When people access to www.mydomain.com/cfg/, F5 will redirect to the same above 5 servers (S3-7)