Forum Discussion

AngryCat_52750's avatar
AngryCat_52750
Icon for Nimbostratus rankNimbostratus
Dec 02, 2013

redirect out of a frame

we have an application spits out a specific URI that i need to redirect to a seperate page.. i got the redirect part to work but its stuck within a frame.. is there a way to have it "redirect outside of the frame" and to the redirected page??

when HTTP_REQUEST {
    if {([string tolower [HTTP::uri]] starts_with "/system/apples") and not ([string tolower [HTTP::uri]] contains "fruits")}{
        HTTP::redirect "https://test.factory.com"
        }
    if {[string tolower [HTTP::uri]] starts_with "/system/engine"}{
        HTTP::redirect "https://test.factory.com"
        }   
    }

1 Reply

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    Yeah... You should be able to...

     

    You need to make sure the target of the link is set to _top (The target specifies which frame to open the doc in... _top is the top frame)...

     

    But to do that you'll probably need a double redirect (Since it's the requester that specifies the frame target, not the URL targeted). (i.e. The URL you redirect to needs to redirect (Could be back to itself) using the target attribute.

     

    H