There are 3 possible reasons why you encountered this error.
It maybe a database corruption, url permalinks problem(in wordpress) or htaccess error.
URL permalinks problem happened if you’ve added a plugin that modifies a permalink, what you need to do is go to setting > permalinks and save it, if it doesn’t work uninstall the last plugin you install before the directive problem triggered.
Database corruption ussually happened when your server/hosting had a maintenance or upgrading something. Usually your site will be okay whenever it’s done(this is if your site suddenly get directive error even you did nothing to your site).
If it happened because you transfer your website to the other hosting, then you have to import your database again.
Another possible reason if your database is not corrupted, then the problem is the htaccess, probably is the rewritebase has an empty value or the rewritecompatibility2 exists in your htaccess and your host is not supporting it.
Just remove the 2 htaccess code mentioned above and your site will be okay.
If none of the above works, kindly post it to the comments.
I’ll be very happy to help you.