updated htaccess rewrite and api class url handling