[lab2] Added redirect handle, added url parsing function