Forum Discussion
Thiyagu_343098
Nimbostratus
Jul 04, 2018irule help to fix the error
Hello all,
I'm getting below error while executing this script.
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "test1.com"}{
set newurl [string map -nocase {"test1.co...
Lee_Sutcliffe
Nacreous
Jul 04, 2018Can you describe what you're trying to do, it looks like you're attempting to replace the host header but your formatting and syntax is muddled.
If just replacing host header you can try something like this
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] contains "test1.com"} {
set newHost "test2.com"
HTTP::header replace Host $newHost
}
}
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