Setting URLs according to request headers