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...
Kirk_Bauer_1018
Altostratus
Aug 23, 2007So you must have two virtual servers -- one for HTTP and one for HTTPS. Is the iRule applied to both virtual servers? Once that is done you must have two data groups, one for each virtual server. You mentioned that you have ProxyPasstestf5web-ssl, you also would need one for the HTTP virtual server.
Next thing to mention is that the rules you are showing are not affecting which server to send the request to. The request will still go to the default pool on the virtual server. All the ProxyPass rule is doing is changing the Host header and/or the request URI. If you want to send matching requests to an alternate pool then you need to use the optional 3rd item in the line in the data group:
testf5web.fiz-karlsruhe.de/netmon netmon.fiz-karlsruhe.de/ OtherPoolName
In this example any request coming in with a Host header equal to "testf5web.fiz-karlsruhe.de" and with a URI starting with "/netmon" will be sent to the pool OtherPoolName and have the "/netmon" stripped off the front of the URI and have the host header changed to be "netmon.fiz-karlsruhe.de". Likewise the rule will do the reverse on any redirects, etc. Any request not matching the left-hand item will not be touched by the rule and will not be modified and will go to the default pool.
I hope that helps!
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
