Forum Discussion
Edit the url before forwarding to an application
Here is a picture of my current access policy
What I am trying to do is edit the http request uri to forward client requests to a particular uri, no matter on what uri they already selected. Ex:
Client enters url: https://10.10.10.10/cool/app/admin
F5 rewrites to: https://10.10.10.10/cool/home
my redirect_to_url action is an irule event, that looks like the following:
`when ACCESS_POLICY_AGENT_EVENT {
log " before it was [HTTP::host][HTTP::uri]"
HTTP::uri /cool/home
log " after it was [HTTP::host][HTTP::uri]"
}`
However, the issue i am having is that the url is never rewritten at the right stage. my logoutput shows the following:
`before it was 10.10.20.191/renderer/agent_irule_event_form.eui `
`after it was 10.10.20.191/cool/home `
While this seems to work, the final uri is set to that of the original: cool/app/admin
What else must I do to ensure that uri rewriting is as close as possible to the final request?
Hi,
You can reassign the redirect url variable like this with a variable block
session.policy.result.redirect.url -> return "/cool/home"
There is no need to use iRule event with ACCESS_POLICY_AGENT_EVENT
- Yann_Desmarest_Nacreous
Hi,
You can reassign the redirect url variable like this with a variable block
session.policy.result.redirect.url -> return "/cool/home"
There is no need to use iRule event with ACCESS_POLICY_AGENT_EVENT
- where do you enter this variable block?
- Yann_Desmarest_NacreousAt the end of your allow branch in your VPE
Hi,
You can reassign the redirect url variable like this with a variable block
session.policy.result.redirect.url -> return "/cool/home"
There is no need to use iRule event with ACCESS_POLICY_AGENT_EVENT
- where do you enter this variable block?
- At the end of your allow branch in your VPE
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