Mac Apache2 404 or 403 Error

When localhost/index.php Return Status 200 IS OK
When localhost/folder/index.php Return Status 404 IS FAILED
Solve Method:
Open mod_rewrite module,Edit httpd.conf delete # mod_rewrite module

sudo vi /etc/apache2/httpd.conf
#User _www //old delete
#Group _www  //old delete
User now_login_user //new
Group now_login_user_group //new

<Directory "/var/www/html">
    Options FollowSymLinks Multiviews  //old
    Options Indexes FollowSymLinks Multiviews  //new
    MultiviewsMatch Any
    AllowOverride deny  //old
    AllowOverride All  //new
    Require all granted
</Directory>
// old
#LoadModule rewrite_module libexec/apache2/mod_rewrite.so
// new
LoadModule rewrite_module libexec/apache2/mod_rewrite.so

# FOR APACHE PHP MUST
#LoadModule php7_module libexec/apache2/libphp7.so // old
LoadModule php7_module libexec/apache2/libphp7.so // new

Done.

作者:CreateChange
创造真有趣。
GitHub