Forum Discussion
Steffen_Lenz_29
Nimbostratus
Aug 21, 2007Rewrite URL
hi,
i searched here in this forum a long time for a irule that satisfy my needs but i didn`t get this things started.
I want to rewrite (not redirect!) URIs as follows:
h...
Steffen_Lenz_29
Nimbostratus
Aug 21, 2007Posted By hoolio on 08/21/2007 3:21 AM
Else, if that's more than what you're looking for, you could use 'HTTP::header replace Host newhost' to rewrite the Host header and HTTP::uri to set the URI before the request is sent to the pool. You may also need to rewrite response content (with a stream profile) and response headers (with HTTP::header replace) to make the change transparent to clients.
Take a look at the proxypass rule and the wiki pages for the various commands and reply with any questions.
Aaron
Thanks. I`ve found Kirks solution before but i think its too complex. I`ve made the following irule but in my client`s browser i get an error:
""
Not Found
The requested URL /directory1 was not found on this server.
""
my irule:
""
when HTTP_REQUEST {
if { [HTTP::uri] contains "directory1"} {
HTTP::header replace Host server11
}
}
""
In addition how do i edit the response content?
Regards,
Steffen
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
