Forum Discussion
Shruti_Malik_84
Nimbostratus
May 11, 2007iRule to log domainname from http_request and location from http_response
Hi,
Can i write an i-Rule to log in ltm file where i can log domain name from http_request header and location from http_response header
Waiting for reply!!
Regards
Shrut...
May 11, 2007
The request part is easy, when you say "location from the response header" what exactly do you mean by that? Do you mean the HTTP "Location" header that is returned on a 301 or 302 redirect?
Here's the code the request and response (if a Location header is returned from the server).
when HTTP_REQUEST {
log local0. "Domain: [HTTP::host]"
log local0. "URI: [HTTP::uri]"
}
when HTTP_RESPONSE {
if { [HTTP::header exists "Location"] } {
log local0. "Location: [HTTP::header Location]"
}
}
Hope this helps...
-Joe
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