Forum Discussion
HTTP::URI not working
Hi,
I have a scenario where all HTTP::URI should be appended with "test". For example, below is my iRule -
when HTTP_REQUEST {
HTTP::uri [HTTP::uri]/test
log local0. "[HTTP::uri]"
}
I do see the logger message like below in /var/log/ltm, but the URL is not actually changing.
Mar 18 18:06:24 pcs-dc-lb5 info tmm1[8333]: Rule /Common/POC : /myuri/test
On the browser, the URL is still http://{mysite}/myuri
I do have other iRules that use similar concept of [HTTP::uri] and works. I'm not sure why the above iRule is not working.
Could anyone please help here?
Thanks, NR
2 Replies
- Michael_Jenkins
Cirrostratus
When you use the
method in an iRule, it changes the URI on that request to whatever you set it to, but that doesn't change the client's URI. The back-end server will see the URI as the updated value, but not necessarily the client.HTTP::uriA way to make this work would be to perform a redirect instead (
) using the new uri, which would redirect the client to the desired page and change the browser url.HTTP::redirect - Neeharika_Redd1
Nimbostratus
Thanks Michael! Will have to ensure HTTP::redirect doesn't end up in redirect loop...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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