您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

apache如何开启伪静态

2025/12/24 5:35:28发布22次查看
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如何开启伪静态的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product