Forum Discussion
Host Rewrite or iRule?
Hello All, I am a total noob when it comes to out F5 BIG-IP LTM. I know enough to do some pretty basis stuff. I have been asked to do something that I have never had to do before. My company has a need do what I think is a host URI rewrite or "something" Basically, I need to :
externalSiteA.company.com --> F5 vip/vs "repoints it to" --> internalSiteXYZ/aba/blabla/12345 ( This is being a very specific inside URL to an application.
Does this make sense. Any help would be greatly appreciated!!!! Thank you.
- Hannes_Rapp_162Nacreous
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "externalsitea.company.com") && ([HTTP::path] eq "/" ) }{ HTTP::header replace Host "internalsitexyz" HTTP::path "/aba/blabla/12345" } else { return } }
Client talks to 'externalsitea.company.com' and meanwhile, behind the scenes, F5 forwards such requests to your Pool Member as 'GET internalsitexyz/aba/blabla/12345'.
That solution only masquerades headers. If you need to modify response payload (i.e. some HTML links), you will need to use a stream profile https://devcentral.f5.com/questions/rewrite-body-of-web-site
- Tyson_JamesCirrusThanks for your response. That is doing "something", but I am getting an error. The external site to trying to "talk" to an Oracle application on the inside. I am getting an Oracle error that : Error Error processing request. ORA-01403: no data found OK
- Hannes_Rapp_162NacreousWhat do you mean by external site? I'm trying to understand if the external site is a different application that talks to the Oracle service which is hosted via F5?
- Hannes_RappNimbostratus
when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "externalsitea.company.com") && ([HTTP::path] eq "/" ) }{ HTTP::header replace Host "internalsitexyz" HTTP::path "/aba/blabla/12345" } else { return } }
Client talks to 'externalsitea.company.com' and meanwhile, behind the scenes, F5 forwards such requests to your Pool Member as 'GET internalsitexyz/aba/blabla/12345'.
That solution only masquerades headers. If you need to modify response payload (i.e. some HTML links), you will need to use a stream profile https://devcentral.f5.com/questions/rewrite-body-of-web-site
- Tyson_JamesCirrusThanks for your response. That is doing "something", but I am getting an error. The external site to trying to "talk" to an Oracle application on the inside. I am getting an Oracle error that : Error Error processing request. ORA-01403: no data found OK
- Hannes_RappNimbostratusWhat do you mean by external site? I'm trying to understand if the external site is a different application that talks to the Oracle service which is hosted via F5?
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