First off a word of caution: This method could get you into trouble so watch yourself. A competitor could scream cheater! Fact is, its not cheating its not cloaking either, its using the referer string in combination with the query string to deliver content.

Many long tail searches often land on pages that don’t really cut the mustard for the query. This is lose lose. You lose in terms of outputting a page that isn’t really relevant to what the user was looking for and the user loses by having to hit the back button.