Nginx "rewrite" question

I need a “special” configuration for nginx.
I have a VHOST (ie.:test.pippo.net) with its document root.
For better google indicization I need to forward and masquerade (better
with rewrite rule) all http request for test.pippo.net/country_*/ to
$1.pippo.net

Is it possibile?

Thanks.