Construct parent url dynamically