Forum Discussion
Rewrite Public Host Name to Internal Host Name
- 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
When using -
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 }
}
}
Updating the iRule returns an error - [wrong args] [HTTP::host $host]
Addtionally when using -
when HTTP_REQUEST { HTTP::host [string map {".com" ".local"} [HTTP::host]]
switch HTTP:host {
ninja.local { pool IIS_Server_Pool_Ninja }
draven.local { pool IIS_Server_Pool_draven }
default { reject }
}
}
Updating the iRule - line 2: [wrong args] [HTTP::host [string map {".com" ".local"} [HTTP::host]]]
Any advice on what im doing wrong?
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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