updated server to redirect to the right place