Forum Discussion

Geoff_34657's avatar
Geoff_34657
Icon for Nimbostratus rankNimbostratus
Aug 22, 2017

I cannot figure why my irule is not always working.

I have 1 VS on port 80 with an irule to redirect to a specific HTTPS site on port 8443. If I go directly to the URL below in the irule it works just fine. I use a GTM and a CNAME in the process also. I have CNAME that points site.domain.com to site.wip.domain.com (located on the GTM). This has a pool which is pointed to VS_80. Then VS_80 should run the irule below. If I type in site.wip.domain.com it works. I just type in "site" (we have dns suffixes) it works. However, if I type in site.domain.com it redirects to https://site.domain.com and fails. I am at a loss as to why this happens.

 

when HTTP_REQUEST { HTTP::redirect "https://www.domain.com:8443/cupuser/showHomeMini.do?mini=true"; log local0. "Client Connected, IP: [IP::client_addr]"}

 

3 Replies

  • VS Config
    ltm virtual /Trust/site_8443_VS {
        destination /Trust/X.X.X.X%40:8443
        ip-protocol tcp
        mask 255.255.255.255
        pool /Trust/site.8443
        profiles {
            /Common/serverssl {
                context serverside
            }
            /Common/tcp { }
            /Trust/site {
                context clientside
            }
        }
        source 0.0.0.0/0
        source-address-translation {
            type automap
        }
        translate-address enabled
        translate-port enabled
    }
    ltm virtual /Trust/site_http_VS {
        destination /Trust/X.X.X.X%40:80
        ip-protocol tcp
        mask 255.255.255.255
        pool /Trust/site_80_pool
        profiles {
            /Common/http { }
            /Common/tcp { }
        }
        rules {
            /Trust/site.redirect
        }
        source 0.0.0.0/0
        source-address-translation {
            pool /Trust/site_SNAT
            type snat
        }
        translate-address enabled
        translate-port enabled
    }