Modifying the way to redirect service to localhost