Replacing localhost with URL