BIG-IP irule : determine page-type

F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi

Request urls can be in following forms :

www.gofish.com
www.gofish.com/barracuda
www.gofish.com/sharks/blacknose
www.gofish.com/species.html
www.gofish.com/bait.aspx
www.gofish.com/bait.aspx?color=green

I need to determine if a request is for a page ( *.html , *.aspx ) vs a resource ( barracuda , /sharks/blacknose ).

More specifically, I need to determine if request is for an .aspx page.

i would use a TCL construct like this

when HTTP_REQUEST {
  if { [HTTP::uri] matches_regex {(html?|aspx)$}  }  {
     do something
  } else {
     do something else
  }
}