您好,欢迎访问一九零五行业门户网

apache如何开启伪静态

apache开启伪静态的步骤:
打开apache的配置文件httpd.conf,路径:wamp\bin\apache\apache2.4.9\conf\httpd.conf 
找到
#loadmodule rewrite_module modules/mod_rewrite.so
把前面#去掉。没有则添加,但必选独占一行,使apache支持 mod_rewrite 模块
找到
<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://httpd.apache.org/docs/2.2/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>
把 allowoverride none 换成 allowoverride all 使apache支持 .htaccess 文件
重启apache服务器
在要启用伪静态的 php 项目根目录下建立 .htaccess 文件
更多apache的相关技术文章,请访问apache教程栏目进行学习!
以上就是apache如何开启伪静态的详细内容。
其它类似信息

推荐信息