Added htaccess and fix sql