A piece of fun, a practical joke. The Scotch say of a man who indulges in intoxication, “He goes the rig.” The same word is applied in Scotland to a certain portion or division of a field. A wanton used to be called a rig. (French, se rigoler, to make merry.)
He little thought when he set out Of running such a rig.
“Jack was rigged out in his gold and silver lace, with a feather in his cap.” —L'Estrange.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Rig from Infoplease: