a proper error handling for htaccess script