Forum Discussion
Goran_Blomquis1
Nimbostratus
May 29, 2008rewrite host in redirect
Hi Devcentral and all users.
I have a case where I need to rewrite host in 302 redirect. It´s work fine but theres a lot of hosts behind the F5 and they need to keep hostname intact (no...
hoolio
Cirrostratus
May 29, 2008Hi,
I can't think of a simple way to do this with string-based commands. Here is an option for using a regex:
HTTP::header replace Location [regsub -nocase {/[a-z]*\.[a-z]*\.[a-z]*/} [HTTP::header Location] /x.external.com/]
Note that the leading and trailing forward slashes are literal and are just used to anchor the match to just the host value.
Aaron
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects