Forum Discussion
How to redirect or change content in an iFrame
i have a similar scenario.. So we have a web app that we don’t want users to get to the login page.. the app should only be accessible through primary portal.. so the main portal will send the following URL/URI through – https://www.secondary.com/app/index.aspx?authid={session-token}
The use case I am trying to solve for is if a user enters the following –
https://www.secondary.com/app/index.aspx?authid=
or
https://www.secondary.com/app/index.aspx?authid={start-typing-stuff}
this directs to a page with iframes.. top and side and body.. I found a URI request going to a specific path that causes it but when I redirect with the iRule, the iframe body gets redirects and not the whole page..
the current irule i have is this -
when HTTP_REQUEST {
if {([string tolower [HTTP::uri]] starts_with "/app/index.aspx") and not ([string tolower [HTTP::uri]] contains "authid")}{
HTTP::redirect "https://www.primary.com"
}
if {[string tolower [HTTP::uri]] starts_with "/app/engine/login.aspx"}{
HTTP::redirect "https://www.primary.com"
}
}
when i do that, the top and side frames remain with the secondary formating and the body gets redirected..
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com