1.进入Apache编辑httpd.conf文件
2.找到#LoadModule rewrite_module modules/mod_rewrite.so
改为
LoadModule rewrite_module modules/mod_rewrite.so
3.找到
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride None
改为
AllowOverride All
重启Apache
cd /usr/local/apache/bin/
./apachectl restart