Forum Discussion

Ahmad_03_151082's avatar
Ahmad_03_151082
Icon for Nimbostratus rankNimbostratus
Apr 29, 2015

HTTP to HTTPs exclude URLs

Hello

 

I am facing problem with my iRule which is redirect HTTP to HTTPs when HTTP_REQUEST { switch -glob [string tolower [HTTP::host][HTTP::uri]] { "xyz.com/pubportal/something" - "xyz.com/pubportal/anything" { Do nothing } default { HTTP::respond 302 location "https://[HTTP::host][HTTP::uri]" } } } this iRule to redirect http://xyz.com to https://xyz.com then it should exclude xyz.com/pubportal/something and xyz.com/pubportal/anything from this redirection but it doesnt work which meant the above iRule redirect everything to HTTPs. I have two virtual server HTTP and HTTPS Also i have created an iRule for pubportal on HTTP VS "/pubportal*" { HTTP::uri "[string range [HTTP::uri] 10 end]" }

 

I need a help!

 

36 Replies