本文摘自PHP中文网,作者步履不停,侵删。

apache开启伪静态的步骤:
打开apache的配置文件httpd.conf,路径:wamp\bin\apache\apache2.4.9\conf\httpd.conf
找到
1 | #LoadModule rewrite_module modules/mod_rewrite.so
|
把前面#去掉。没有则添加,但必选独占一行,使apache支持 mod_rewrite 模块
找到
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <Directory "D:/ApacheServer/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:
# 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>
|
把 AllowOverride None 换成 AllowOverride All 使apache支持 .htaccess 文件
重启apache服务器
在要启用伪静态的 PHP 项目根目录下建立 .htaccess 文件
更多Apache的相关技术文章,请访问Apache教程栏目进行学习!
以上就是apache如何开启伪静态的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
linux配置nginx伪静态
Apache hadoop是什么?
Apache 2.2 2.4 区别
Apache服务配置详细讲解
配置Apache服务器的默认首页
Apache atlas是什么意思
Apache如何实现域名转发
Apache最新版本是多少
Apache配置端口转发的具体方法
Apache server是什么
更多相关阅读请进入《Apache》频道 >>
转载请注明出处:木庄网络博客 » apache如何开启伪静态