Change URL variables based on global URL