added htaccess file inc error handling