setting url and displaying page accordingly