replacing polymorphic urls with constructed urls