Forum Discussion
http uri rewrite iRule help
Folks, I have a requirement to rewrite http URI path from /abc/xyz to /SP/def/CRM (not through http redirect or ProxyPass).
Client request: http://company.com/abc/xyz
BIG-IP should forward the request to pool/pool member as per below.
server receive request: http://company.com/SP/def/CRM
- Snl
Cirrostratus
give a try
when HTTP_REQUEST { if {[string tolower [HTTP::host]] starts_with "company.com" && [string tolower[HTTP::path]] eq "/abc/xyz"} { pool pool HTTP::uri "/SP/def/CRM" } }
- Koti_Reddy_Koll
Nimbostratus
Hi Snl,
thanks for your response. I’m getting a syntax error while trying the iRule.
Remember, only use iRules when needed (last resort). In this case it’s probably best to use a rewrite profile. See:
- Koti_Reddy_Koll
Nimbostratus
Hi Niels,
thanks for your response. I tried to create a http rewrite profile and got stuck at policy options especially I don’t find Requires setting and control settings options. I’m running with 12.1.2 ver.
- For the Requires setting, select http from the Available list, and move the entry to the Selected list using the Move button.
- For the Controls setting, select forwardingfrom the Available list, and move the entry to the Selected list using the Move button.
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