Forum Discussion

louie_ortega_44's avatar
louie_ortega_44
Icon for Nimbostratus rankNimbostratus
Nov 24, 2011

Trying to redirec to secondary pool with a maint page but image is not displaying

Hello,

 

I'm trying to send clients to a second pool/ maintenance page in the event there are no pool members available in the default pool. I was able validate this but I need to do a rewrite of the uri to the root and when I have this configured the background .jpg does not appear, only the index.html. With out the HTTP:: uri "/" ,things do work, but I need to rewrite in the event someone tries to go to a specific uri it automatically sends user to root with the maintenance page. Here is the simple i rule I currently have:'

 

 

 

when HTTP_REQUEST {

 

if default members of pool is less than 1 if {[active_members baremonitor1 ] < 1 } {

 

if {[HTTP::path] eq "/*"} {

 

then redirect to pool istoreMaintenance page

 

HTTP::uri "/"

 

use pool istoreMaintenance

 

}

 

}

 

 

any ideas would be appreciated.

 

 

Louie

 

 

2 Replies

  • can you try something like this?

    [root@ve1023:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool fake
       destination 172.28.19.79:80
       ip protocol 6
       rules myrule
       profiles {
          http {}
          tcp {}
       }
    }
    [root@ve1023:Active] config  b pool fake list
    pool fake {
       monitor all fake
       members {
          200.200.200.101:9999 {}
          200.200.200.123:80 {}
       }
    }
    [root@ve1023:Active] config  b pool fake|grep -i pool\ member
    +-> POOL MEMBER fake/200.200.200.101:9999   inactive,down
    +-> POOL MEMBER fake/200.200.200.123:80   inactive,down
    
    [root@ve1023:Active] config  b rule myrule list
    rule myrule {
       when HTTP_REQUEST {
            if {[string tolower [HTTP::uri]] starts_with "/maint/"}{
                    scan [HTTP::uri] {/maint%s} new_uri
                    HTTP::uri $new_uri
                    pool maint_pool
                    return
            }
    
            if {[active_members [LB::server pool]] < 1}{
                    HTTP::redirect "http://[HTTP::host]/maint/"
            }
    }
    }
    [root@ve1023:Active] config  b pool maint_pool list
    pool maint_pool {
       members 74.125.235.51:80 {}
    }
    
    [root@ve1023:Active] config  ssldump -Aed -nni 0.0 port 80
    New TCP connection 1: 192.168.204.7(57295) <-> 172.28.19.79(80)
    1322186595.8322 (0.0198)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; BRI/2; .NET4.0E)
    Accept-Encoding: gzip, deflate
    Host: 172.28.19.79
    Connection: Keep-Alive
    ---------------------------------------------------------------
    
    1322186595.8323 (0.0000)  S>C
    ---------------------------------------------------------------
    HTTP/1.0 302 Found
    Location: http://172.28.19.79/maint/
    Server: BigIP
    Connection: Keep-Alive
    Content-Length: 0
    ---------------------------------------------------------------
    
    1322186595.8562 (0.0239)  C>S
    ---------------------------------------------------------------
    GET /maint/ HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; BRI/2; .NET4.0E)
    Accept-Encoding: gzip, deflate
    Host: 172.28.19.79
    Connection: Keep-Alive
    ---------------------------------------------------------------
    
    New TCP connection 2: 172.28.19.80(57295) <-> 74.125.235.51(80)
    1322186595.8614 (0.0050)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; BRI/2; .NET4.0E)
    Accept-Encoding: gzip, deflate
    Host: 172.28.19.79
    Connection: Keep-Alive
    ---------------------------------------------------------------