打开apache的配置文件httpd.conf
1.把#LoadModule rewrite_module modules/mod_rewrite.so前面的#去掉。
2.找到
#
# 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
最后就是重启一下apache服务器使配置生效,这样就支持.htaccess文件了
本文介绍如何通过修改Apache配置文件httpd.conf来启用.htaccess文件支持。主要步骤包括取消注释mod_rewrite模块、更改AllowOverride指令为允许所有,并重启Apache服务。
937

被折叠的 条评论
为什么被折叠?



