It's your quotes around "/sol". They are so-called "smart quotes". They are a character sequence that cannot be processed by the iRule loader. You can remove them, or copy-and-paste this:
when HTTP_REQUEST {
log local0. "http uri: [HTTP::uri]"
if { ( [string tolower [HTTP::uri]] starts_with "/solr/spruat_slave" ) or ( [string tolower [HTTP::uri]] starts_with "/sol" ) } {
log local0. "matched [HTTP::uri]"
pool mhf_pool_172.16.250.72-slave
}
}
Incidentally, I found these by going to the command-line and executing:
tmsh create ltm rule foo
Once I pasted in your rule, the bad characters were reasonably obvious.