Forum Discussion
extremeboozer_3
Nimbostratus
Oct 23, 2007Insert new URL
Even though myself and my co-worker pride ourselves in being rule hacks we still have yet to figure out how to write a rule to change the destination URL of an HTTP request without redirecting the clients browser. Hope this makes sense to someone else but me.
thanks for the help
- A HTTP::redirect will issue a full HTTP redirect to the client browser, change the address bar, and have the browser send a new request to the server. This is likely what you have discovered. If you wish to just "change" the URI so the backend server sees something different than the client browser, you can do so with a combination of the "Host" header and the HTTP::uri command.
when HTTP_REQUEST { HTTP::header replace "Host" "foobar.com" HTTP::uri "/some/new/path" }
http://foobar.com/some/new/path
- Bookernoe69_111
Nimbostratus
Joe, I appreciate you quick response to a newbie. But I just must be really dull. - Bookernoe69_111
Nimbostratus
My mistake. I had to point the virtual server to the iRule and a pool.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects