adapting url for proper domain switching