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
...
May 29, 2007
You are asking about changing the host value, not the URI. The format of a URL is the following
http://[HTTP::host][HTTP::uri]
http://www.foo.com/foo/bar
HTTP::host -> www.foo.com
HTTP::uri -> /foo/bar
So, for your specific question, you'll need to tweak the Host header. For a host modification, you can do the following:
when HTTP_REQUEST {
if { [HTTP::host] eq "123.abc.com" } {
HTTP::header replace "Host" 123ext.abc.com"
}
}This will modify the Host header of the HTTP request to the backend server to be "123ext.abc.com" so it will effectively look to the backend server like the request was http://123ext.abc.com/....
Hope this helps...
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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