Forum Discussion
How to replace a url hardcoded in server response.
Hello Everyone,
I have public server website and when we click on a "ClickHere" button it will redirecting to "https://brokensorry.com".
Server Team unable to alter the hardcoded url on the server and wanted to change the response on F5 with url "https://goodok.com".
"https://brokensorry.com" = "https://goodok.com"
I see its not the header or host to replace, its in the post/response from the server in json or metadata.
Could someone help with the iRule to replace the content in metagata or post js file when presenting to client.
Sounds like you want to use the stream profile, have a look at the K article on it:
the article says:
- When you configure the virtual server with the HTTP profile, the Stream profile performs only the search and replace procedure on the HTTP payload. This applies to both client requests and server responses.
that means not only headers, but also the body.
- ashkCirrus
thank You so much for your quick reply.
It worked. I added a new profile (Local Traffic / Profiles / Other / Stream) and inserted source and target and attached it to VirtualServer.
I see the redirection happens.
Thanks in tons. 🙂
Sounds like you want to use the stream profile, have a look at the K article on it:
- ashkCirrus
I see the article is similar but it talks about the header replacement.
The text I want to replace is in the body returned by server to client in html metadata.
Could you please help me with the same if anything?
the article says:
- When you configure the virtual server with the HTTP profile, the Stream profile performs only the search and replace procedure on the HTTP payload. This applies to both client requests and server responses.
that means not only headers, but also the body.
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