Reference: http://wiki.nginx.org/HttpRewriteModule#rewrite
If the replacement string begins with http:// then the client will be redirected, and any further >rewrite directives are terminated.
So remove the http:// part and it should work:
location ~ /[0-9]+ {
rewrite "/([0-9]+)" /v.php?id=$1 break;
}