guess base_url and remove staging