Handle incoming parameters and reconstruct urls