Forum Discussion

haxzorian_35595's avatar
haxzorian_35595
Icon for Nimbostratus rankNimbostratus
Nov 10, 2011

Redirect URI issue HTTP vs HTTPS

I have two virtual servers, both pointing to the same vip. One for HTTP and one for HTTPS. I have an iRule to take the URI passed and redirect it to a given link. This iRule is on both VS, however it only works when a user puts in https://xyz.com/uri. Should a user put in http://xyz.com/uri it comes up with a page not displayed error.

 

 

Here is the code:

 

 

timing on when HTTP_REQUEST { switch [string tolower [HTTP::uri]] { "/heroupdate" { HTTP::redirect "http://custsupport.xyz.com/app/answers/detail/a_id/448" } "/xupdate" { HTTP::redirect "http://custsupport.xyz.com/app/answers/detail/a_id/459" } "/survey" { HTTP::redirect "https://custsupport.xyz.com/ci/documents/detail/5/67" } "/htcheroupdate" { HTTP::redirect "https://custsupport.xyz.com/app/answers/detail/a_id/448" } "/desireupgrade" { HTTP::redirect "https://custsupport.xyz.com/app/answers/detail/a_id/460" } "/axisupdate" { HTTP::redirect "https://custsupport.xyz.com/app/answers/detail/a_id/463" } "/wildfireupdate" { HTTP::redirect "https://custsupport.xyz.com/app/answers/detail/a_id/464" } "/classes" { HTTP::redirect "http://www.xyz.com/Personal/Wireless/Smartphone-Help.aspx" } } }

 

 

 

Anyone know what might be the issue? I'm stumped.

 

  • can you post the http virtual server and pool configuration here?

     

     

    e.g.

     

    b virtual virtual_server_name list

     

    b pool pool_name list
  • HTTPS

     

    virtual www.xyz.com-vs-https { snat automap pool www.xyz-pool-https destination 10.136.125.102:https ip protocol tcp rules { xyz-blank2www-https ac-redirect-host ac-redirect-uri akusf-rdir webstore-disable-redirect billpay-redirect-v2 pick-pool-member } persist source_addr profiles { http {} serverssl { serverside } tcp {} www.xyz.com-clientssl { clientside } } } pool www.xyz-pool-https { min active members 1 monitor all https members { 209.193.8.71:https { priority 2 } 209.193.8.73:https { priority 2 } 209.193.8.75:https {} } }

     

     

    HTTP

     

    virtual www.xyz.com-vs-http { snat automap pool www.xyz-pool-http destination 10.136.125.102:http ip protocol tcp rules { xyz-blank2www-http ac-redirect-uri ac-redirect-host akusf-rdir acsmobile-redirect akcom-redirect-switch billpay-redirect billpay-redirect-v2 sitecore-admin-pmember-select webstore-disable-redirect acspipe-rdir-akcom pick-pool-member } persist source_addr profiles { tcp {} www_http {} } } pool www.xyz-pool-http { min active members 1 monitor all http members { 209.193.8.71:http { priority 2 } 209.193.8.73:http { priority 2 } 209.193.8.75:http {} } }

     

     

    Sorry about the formatting. I'm unfamiliar with this forums code tags...
  • virtual www.xyz.com-vs-https { 
       snat automap 
       pool www.xyz-pool-https 
       destination 10.136.125.102:https 
       ip protocol tcp 
       rules { 
          xyz-blank2www-https 
          ac-redirect-host 
          ac-redirect-uri 
          akusf-rdir 
          webstore-disable-redirect 
          billpay-redirect-v2 
          pick-pool-member 
       } 
       persist source_addr 
       profiles { 
          http {} 
          serverssl { serverside } 
          tcp {} 
          www.xyz.com-clientssl { clientside } 
       } 
    } 
    
    pool www.xyz-pool-https { 
       min active members 1 
       monitor all https 
       members { 
          209.193.8.71:https { priority 2 } 
          209.193.8.73:https { priority 2 } 
          209.193.8.75:https {} 
       } 
    }
    
    virtual www.xyz.com-vs-http { 
       snat automap 
       pool www.xyz-pool-http 
       destination 10.136.125.102:http 
       ip protocol tcp 
       rules { 
          xyz-blank2www-http 
          ac-redirect-uri 
          ac-redirect-host 
          akusf-rdir 
          acsmobile-redirect 
          akcom-redirect-switch 
          billpay-redirect 
          billpay-redirect-v2 
          sitecore-admin-pmember-select 
          webstore-disable-redirect 
          acspipe-rdir-akcom 
          pick-pool-member 
       } 
       persist source_addr 
       profiles { 
          tcp {} 
          www_http {} 
       } 
    } 
    
    pool www.xyz-pool-http { 
       min active members 1 
       monitor all http 
       members { 
          209.193.8.71:http { priority 2 } 
          209.193.8.73:http { priority 2 } 
          209.193.8.75:http {} 
       } 
    }
    

    is there any error in /var/log/ltm when browsing http://xyz.com/uri?

    have you tried curl?

    e.g.

    curl -I http://xyz.com/uri
    • Nath's avatar
      Nath
      Icon for Cirrostratus rankCirrostratus

      Hi Nitass,

       

      We're stuck w/ the same issue here. We have a redirection from http -> https://abc.com:/uri/loginpage

       

       

      But after we login, the https traffic became http does f5 encountered this kind of scenario before?

       

      Thanks,

       

      -Nat

       

  • virtual www.xyz.com-vs-https { 
       snat automap 
       pool www.xyz-pool-https 
       destination 10.136.125.102:https 
       ip protocol tcp 
       rules { 
          xyz-blank2www-https 
          ac-redirect-host 
          ac-redirect-uri 
          akusf-rdir 
          webstore-disable-redirect 
          billpay-redirect-v2 
          pick-pool-member 
       } 
       persist source_addr 
       profiles { 
          http {} 
          serverssl { serverside } 
          tcp {} 
          www.xyz.com-clientssl { clientside } 
       } 
    } 
    
    pool www.xyz-pool-https { 
       min active members 1 
       monitor all https 
       members { 
          209.193.8.71:https { priority 2 } 
          209.193.8.73:https { priority 2 } 
          209.193.8.75:https {} 
       } 
    }
    
    virtual www.xyz.com-vs-http { 
       snat automap 
       pool www.xyz-pool-http 
       destination 10.136.125.102:http 
       ip protocol tcp 
       rules { 
          xyz-blank2www-http 
          ac-redirect-uri 
          ac-redirect-host 
          akusf-rdir 
          acsmobile-redirect 
          akcom-redirect-switch 
          billpay-redirect 
          billpay-redirect-v2 
          sitecore-admin-pmember-select 
          webstore-disable-redirect 
          acspipe-rdir-akcom 
          pick-pool-member 
       } 
       persist source_addr 
       profiles { 
          tcp {} 
          www_http {} 
       } 
    } 
    
    pool www.xyz-pool-http { 
       min active members 1 
       monitor all http 
       members { 
          209.193.8.71:http { priority 2 } 
          209.193.8.73:http { priority 2 } 
          209.193.8.75:http {} 
       } 
    }
    

    is there any error in /var/log/ltm when browsing http://xyz.com/uri?

    have you tried curl?

    e.g.

    curl -I http://xyz.com/uri
    • Nath's avatar
      Nath
      Icon for Cirrostratus rankCirrostratus

      Hi Nitass,

       

      We're stuck w/ the same issue here. We have a redirection from http -> https://abc.com:/uri/loginpage

       

       

      But after we login, the https traffic became http does f5 encountered this kind of scenario before?

       

      Thanks,

       

      -Nat