Forum Discussion
iRule Rewrite in Browser
You can use various things to rewrite the response page from the web page. Before you do that though, just check if you actually need to...
The first option is relative links. If the website links are relative then the hostname can change and it wont affect he application at all. So this is a good option if it exists or can be enabled. YMMV
The second option is the hostname of the site. This is often controlled by a single configuration option on a web application. Be it in the application itself or the virtual host configuration of the web server that is serving up the application. It is worth asking the question... does this setting exist and can it be modified?
Finally when those options have been explored and discarded we need to do rewrites. The question now is is just 3xx redirects that need to be rewritten or all links. If it's just redirects then there are options in the HTTP profile that can help with re-writing redirects. This F5 DevCentral video touches on redirect rewrites as well.
Then as the last option we have content rewriting and this is covered in some detail in this lab provided by F5. Essentially you define a search replace pattern which the F5 applies on response traffic. This pattern is surrounded by tokens. In it simplest format @find@replace@. Repeat for more replacements. This requires the F5 to inspect all return traffic and rewrite as needed.
The order of the options above is based on F5 performance impact. The first two have no impact on the performance of the F5. The third has minimal. The last is the most demanding as it requires the F5 to scan all response traffic for an application.
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
