moving redirect to server