Forum Discussion
Steve_89474
Nimbostratus
Aug 17, 2009host header redirect (?) and hide URI
I have a request coming in for: www.trees.somedomain.com
and I want the request to be handled by www.outdoor.somedomain.com/trees
but all I want the user to see is the ww...
Aug 17, 2009
If you want to mask if from the end user, you can just change the "Host" header value in the HTTP_REQUEST event.
when HTTP_REQUEST {
if ( [HTTP::host] eq "www.trees.somedomain.com" ) {
HTTP::header replace "Host" "www.outdoor.somedomain.com"
HTTP::uri "/trees"
}
}
Now, keep in mind that this will direct ALL requests to domain "www.trees.somedomain.com" to the backend server in the form of "http://www.outdoor.somedomain.com/trees". You will likely need to modify this a bit if you want to retain any portion of the original Uri in the request.
Hope this helps...
-Joe
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
