Forum Discussion
Lance_Simon_557
May 29, 2007Historic F5 Account
changing the url...do not want a redirect
I'm looking for a way to change a url that comes in from public ip addresses:
url that comes in from public goes is: http://123.abc.com
need it changed to: http://123ext.abc.com
There is no outside dns available for 123ext.abc.com, so a normal redirect would not work.
I'm pretty sure this can be d one, but I not sure of the syntax.
Any assistance would be appreciated.
Thanks
- You are asking about changing the host value, not the URI. The format of a URL is the following
http://[HTTP::host][HTTP::uri]
when HTTP_REQUEST { if { [HTTP::host] eq "123.abc.com" } { HTTP::header replace "Host" 123ext.abc.com" } }
- Lance_Simon_557Historic F5 AccountJoe,
- JRahm
Admin
Try this. I added a missing leading quote to your host header replacement value.when HTTP_REQUEST { if { ([matchclass [IP::remote_addr] equals $::group_public_websites]) and ([HTTP::host] eq "123.abc.com") } { HTTP::header replace "Host" "123ext.abc.com" pool pool_public_websites } else { HTTP::redirect "http://www.abc.com/temp/outage.jsp/" } }
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