Subtask 5 of #24: Add background logic to replace in url