Forum Discussion
chemaf_15095
Nimbostratus
Mar 22, 2010iRule to imitate rewrite with proxy [P]
Hi,
I need help with iRules to do the same as a rewrite of Apache, but with the proxy option [P].
I do not want to rewrite the url, all links must remain with the public URL and not the ...
hoolio
Cirrostratus
Mar 22, 2010You can use the ProxyPass or ProxyPass for LTM v10 to rewrite the host and/or URI (as opposed to redirecting the client).
http://devcentral.f5.com/wiki/default.aspx/iRules/proxypass
http://devcentral.f5.com/wiki/default.aspx/iRules/proxypassv10
It supports string and regex substitution. If you just want to rewrite the host and URI in requests, you could do this using a simpler iRule that calls HTTP::uri and HTTP::header replace Host $new_host in the HTTP_REQUEST event. You'd want to avoid using regexes if possible as string functions are more efficient.
If you try either option and run into issues, can you post the iRule you're testing and log entries from /var/log/ltm showing the issue?
Thanks,
Aaron
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
