beginning transition from htaccess to apiwrapper