added exceptions handling for .htaccess file