Forum Discussion
skarpovi_111573
Nimbostratus
Mar 27, 2008insert field to HTTP header
can Big IP insert field data into the HTTP header that the IIS server can then read and use to determine whether or not the user in question is coming from our internal environment or from the public ...
Nicolas_Menant
Employee
Mar 28, 2008Hi,
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
}
}
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