Hi,
What we gave you is an example of the syntax -_- not the solution. It was to help you understand the syntax.
You should have tried some search on this forum to find the answer by yourself...
When you do a redirect you can insert anything in the header so in your iRule you can insert HTTP header only in your else statement
If you had read the documentation about the HTTP::header insert you would have understand that header_1 would have been a new header created in the HTTP request which name would have been header 1 and its value would be the following data so in my example it would be value_3.
So to make it easy to understand:
when HTTP_REQUEST {
if {([TCP::local_port] eq "80") and ([IP::client_addr] eq "10.x.x.x/16")} {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
} elseif {[TCP::local_port] eq "80" } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
} else {
HTTP::header insert STRING HERE_YOU_SPECIFY_THE_VALUE_YOU_WANT_STRING_TO_HAVE
pool Servers-Pool
}
}