Added support for access-control header in htaccess.
Added getEntityById and getEntitiesByType.