Make templates localhost aware.