20 Lines or Less #75: URIs, URIs and more URIs
Published Jun 17, 2014
Version 1.0Was this article helpful?
when HTTP_REQUEST {
if { ([string match {[A-Z]} [HTTP::uri]] and [[HTTP::path] ends_with ".aspx"])} {
set hostname [string tolower [HTTP::host]]
set uriname [string tolower [HTTP::uri]]
log local0. "Request is $hostname$uriname"
HTTP::redirect "http://$hostname$uriname"
}
}
This one shouldn't encounter redirect loops.