change webapp URL generation logic