Encapsulated redirect for old URLS into a function