error_page 404 = @tofront;

    location @tofront{
        rewrite .* http://www.r-biopharm.com/? permanent;
    }