Forum Discussion
IRule for reverse proxy with http rewrite
My company has modified the request. This is what they want now.
company site http://www.opco.com/jobs/apply external site http://newsite.com/mobileapply/opco
company site http://www.opco.com//jobs/apply/resume-thanks external site http://newsite.com/mobilethankyou/opco
company site http://www.opco.com/jobs/privacy external site http://newsite.com/mobileprivacy/opco
company site http://www.opco.com/jobs/terms external site http://newsite.com/mobileterms/opco
I modified the irule from above to this:
when CLIENT_ACCEPTED { set default_pool [LB::server pool] } when HTTP_REQUEST { switch [string tolower [HTTP::uri]] { "/jobs/apply" { HTTP::uri "/mobileapply/opco/" pool cbmserver.com } "/jobs/apply/resume-thanks" { HTTP::uri "/mobilethankyou/opco" pool cbmserver.com } "/jobs/privacy" { HTTP::uri "/mobileprivacy/opco" pool cbmserver.com } "/jobs/terms" { HTTP::uri "/mobileterms/opco" pool cbmserver.com } default { pool $default_pool } } }
When I test it, the URI changes to mobileapply/opco instead of staying jobs/apply and doesn't open the page.
When i try to add HTTP::header replace Host newsite.com, i get an error when i click the update button.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
