fixing duplicate relative/absolute urls issue