Forum Discussion
Draven_186334
Altocumulus
Feb 10, 2015Rewrite Public Host Name to Internal Host Name
Hello,
Trying to modify the public URL to the local URL for IIS backend servers, along with using host header redirection.
So trying to -
draven.com rewrite to draven.local - then sw...
- Feb 12, 2015
Solution Found -
WHEN HTTP_REQUEST { set header [string map {".com" ".local"} [HTTP::header "Host"]] HTTP::header replace host $header switch $header { ninja.local { pool IIS_Server_Pool_Ninja } draven.local { pool IIS_Server_Pool_draven } default { reject } } }
Thanks For your help
cjunior
Nacreous
Feb 11, 2015Hi, you need to change only the host header request? Try something like this:
when HTTP_REQUEST {
set host [string map {".com" ".local"} [HTTP::host]]
HTTP::host $host
switch $host {
ninja.local { pool IIS_Server_Pool_Ninja }
draven.local { pool IIS_Server_Pool_draven }
default { reject }
}
}
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