'Magento 2 .htaccess File Issue

Magento 2 only loads when .htaccess file is disabled or I rename it. But when I enable .htaccess, it give 500 error. I have tried tracking the issue in vain.

  1. I tried enabling development mode to see if Magento 2 can tell the reason why, but no error message came up.

  2. I constantly checked error log files, but couldn't find any error message relating to that.

Any suggestion? Anyone had this issue before? How did you resolve that?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source