Forum Discussion

Pete_02_141055's avatar
Pete_02_141055
Icon for Nimbostratus rankNimbostratus
Jan 13, 2017

Mask Url....

I need to send to but it needs to stay the former. When i add anything to redirect I on the https virtual server I get to many redirects.

 

The last thing i tried was:

 

when HTTP_REQUEST { if { [HTTP::host] equals "; } { HTTP::redirect "/append" } } Any Ideas?

 

2 Replies

  • have you tried to use HTTP Local policies which make it easier than writing an irule?

     

  • 1.The best option in my opinion is to identify the overlapping redirects and remove it and make sure that the client & the server see the same URL. I haven't been able to understand the need for masking URL as a Network guy.

    2.If you still insist on masking, try something like this:

    when HTTP_REQUEST { 
    if { ([HTTP::host] equals "www.xyz.com") and ([HTTP::uri] eq "/") } { 
    HTTP::uri "/append" 
    } 
    } 
    when HTTP_RESPONSE {
    if { [HTTP::header values Location] contains "/append" } {
    HTTP::header replace Location [string map {/append /} [HTTP::header value Location]]
    }
    }