Forum Discussion
Drew_123833
Nimbostratus
Mar 31, 2014Analyzing requests
Hi there
This weekend we changed our website. All went well. Only a few issues.
We removed the /item/..... subpage. (www.example.com/item/....).
The problem is that we still get hundreds of requ...
Mar 31, 2014
Hi Drew
You should be able to see the origin of the requests in your web server logs, if not there are ways of logging it, but it'd make your LTM log a bit messy, so I'd recommend using scripts (ie python or powershell) for your old logs (there would be no new ones if you redirect with the F5).
Try this rule:
when HTTP_REQUEST {
set path [string tolower [HTTP::path]]
if { $path starts_with "/item" } {
HTTP::respond 301 Location https://[HTTP::host]/the-new-uri/
}
}
This would trigger for /items too so if you want to be more specific you can chose "/item/" as condition.
If you want a logging function you can try this:
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { $uri starts_with "/item" } {
if { $uri contains "&" } { log local0. [IP::client_addr] }
HTTP::respond 301 Location https://[HTTP::host]/the-new-uri/
}
}
Right now it only logs the IP of the client, but you can change it to your liking.
/Patrik
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