server {
        listen       80;
        server_name  site.ru;
        location ~ ^/forum/(.*)$ {
        return 301 http://site.ru/$1$is_args$args; 
        }
location = / {
if ($arg_t > 0) {
return 301 "/viewtopic.php?t=$arg_t";
}
}
        location / {
            root   /www/site.ru;
            index  index.php index.html index.htm;
        }