apache2以上版本windows下支持.htaccess


之前写过一篇文章是apache在windows下支持.htaccess的,有朋友反映设置后,依然不支持.htaccess,后来检测发现apache2以上版本已经变更了,下面来看看apache2以上版本windows下支持.htaccess的方法
查找相关文章:apache .htaccess

之前写过一篇文章是apache在windows下支持.htaccess的,有朋友反映设置后,依然不支持.htaccess,后来检测发现apache2以上版本已经变更了,下面来看看apache2以上版本windows下支持.htaccess的方法

打开apache的conf文件httpd.conf
1.找到
#LoadModule rewrite_module modules/mod_rewrite.so
去掉前面的“#” 如果没有找到就查找LoadModule 看到有一大片的LoadModule在下面加入一行
LoadModule rewrite_module modules/mod_rewrite.so

2.红色加粗的None改为All
<Directory "D:/web">

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs-2.0/mod/core.html#options
# for more information.
#
    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
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

3.重新启动apache2