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...
Steve_89474
Nimbostratus
Aug 19, 2009I get file not found.
I can request www.outdoor.somedomain.com/trees from my browser, and I can redirect to it using:
when HTTP_REQUEST {
if { ([HTTP::host] starts_with "www.trees.somedomain.com")} {
HTTP::redirect "http://www.outdoor.somedomain.com/trees"
}
}
But this doesn't work:
when HTTP_REQUEST {
if {[string tolower [HTTP::header "Host"]] eq "www.trees.somedomain.com"}{
HTTP::header replace "Host" "www.outdoor.somedomain.com"
HTTP::uri "/trees"
}
}
I just get a 404 file not found error
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
