Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Sep 06, 2013

How Can we Redirect the below Requirement

Currently, the https://kauffman.xyz.com URL points to http://ktprdapp1.xyz.com:7001

 

How can we add one more URL like below: The F5 url https://kauffman.xyz.com/ibmcognos should point to http://ktprdapp1.xyz.com:80/ibmcognos

 

Do we need to create one more pool: to mark the active member for port:80 for the new URL and than to call the same in irule ? This needs to be accessible via Internet.

 

Kindly assist ?

 

8 Replies

  • So just to be clear, external users access the site using "https://kauffman.xyz.com", which is a VIP on the F5. You want any request to "/ibmcognos" to go to a port 80 pool, and then everything else to go to a port 7001 pool. Correct?

    If so, then:

    1. Define a port 7001 pool (ex. "my_7001_pool") - assign this as the default pool in the VIP configuration

    2. Define a port 80 pool (ex. "my_80_pool")

    3. Define an iRule like the following:

      when CLIENT_ACCEPTED {
          set default_pool [LB::server pool]
      }
      when HTTP_REQUEST {
          if { [string tolower [HTTP::uri]] starts_with "/ibmcognos" } {
              pool my_80_pool
          } else {
              pool $default_pool
          }
      }
      
  • Hi Kevin,

     

    Thank you. So,Just to me more clear.

     

    1. We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?

       

    2. I mean do I Need to mention the 'name of the pool against port 7001' into the script or "default_pool" in the script will work ?

       

    Kindly suggest.

     

    Thanks and Regards Parveez

     

    1. We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?

    yes

     

    1. I mean do I Need to mention the 'name of the pool against port 7001' into the script or "default_pool" in the script will work ?

    no need. [LB::server pool] will return pool name which is assigned to virtual server.

     

  • We have to select manually the pool created against port 7001 in the virtual server and than we have the suggested script will work right ?

     

    Yes, but you don't have to. You could just as easily call it out in the iRule:

     

    when HTTP_REQUEST {
        if { [string tolower [HTTP::uri]] starts_with "/ibmcognos" } {
            pool my_80_pool
        } else {
            pool my_7001_pool
        }

    }

     

    The code in the CLIENT_ACCEPTED event gets the pool that is statically assigned to the virtual server.

     

  • Hi All,

     

    The requirement is working just perfect from internally, but from Internet users are failing to browse, its getting 404 error.

     

    Kindly suggest.

     

    Thanks and Regards Parveez

     

  • Are there any differences between the internal and external client requests? Based on the iRule you're simply switching between pools based on the URI in the request. Are external users getting an immediate 404 or after some specific request? Do you have a OneConnect profile assigned to the VIP?

     

  • Currently Kevin no oneconnect profile associated with it, only HTTP profile.

     

    External means accessible via Internet which currently they are failing with /ibmcognos.

     

  • External means accessible via Internet

     

    Understood. Is it just requests for /ibmcognos? Other requests work?