Forum Discussion

mslater905's avatar
mslater905
Icon for Nimbostratus rankNimbostratus
Nov 19, 2019

Help with HTTPS_Rewrite iRule

Hi all,

 

I'm currently in a bit of a pickle for developing an iRule solution to avoid HTTPS_Rewrite for certain URL's.

 

I currently have an LTM VS configured which has a profile that rewrites all redirects to HTTPS.

 

ltm profile http HTTPS_Rewrite {

  app-service none

  defaults-from http

  enforcement {

    unknown-method allow

  }

  redirect-rewrite all

}

 

For most of the redirects, I want the redirect response to be HTTPS which is why this is applied. There are two instances however, where I want the URL redirect to be HTTP.

 

For instance, for redirects to "www.one.com" & "www.two.com", we don't want the profile to rewrite it to HTTPS.

 

create ltm rule http-response-specific {

  when HTTP_RESPONSE {

if { HTTP::header value Location contains onetwo-list }

{ ....... }

 

I think replacing the Locaton Variable will be too much of a headache, is it possible to identify the location variable and then bypass the profile entirely for connections with these urls?

 

Any help would be greatly appreciated!

 

 

3 Replies

No RepliesBe the first to reply