编辑Apache配置文件
nano /etc/httpd/conf/httpd.conf
找到以下内容,
Include conf.modules.d/*.conf
在上面一行之后添加以下内容,
LoadModule rewrite_module modules/mod_rewrite.so
继续找到以下内容,
Options Indexes FollowSymLinks
#
# 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 None修改为AllowOverride all。