RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
apache开启伪静态的方法-创新互联

这篇文章主要为大家详细介绍了apache开启伪静态的方法,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下。

创新互联-专业网站定制、快速模板网站建设、高性价比元氏网站开发、企业建站全套包干低至880元,成熟完善的模板库,直接使用。一站式元氏网站制作公司更省心,省钱,快速模板网站建设找我们,业务覆盖元氏地区。费用合理售后完善,十年实体公司更值得信赖。

apache开启伪静态的步骤:

打开apache的配置文件httpd.conf,路径:wamp\bin\apache\apache2.4.9\conf\httpd.conf

找到

 #LoadModule rewrite_module modules/mod_rewrite.so

把前面#去掉。没有则添加,但必选独占一行,使apache支持 mod_rewrite 模块

找到


    #
    # 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
 

把 AllowOverride None 换成 AllowOverride All 使apache支持 .htaccess 文件

重启apache服务器

在要启用伪静态的 PHP 项目根目录下建立 .htaccess 文件

以上就是apache开启伪静态的方法的简略介绍,当然详细使用上面的不同还得要大家自己使用过才领会。如果想了解更多,欢迎关注创新互联行业资讯频道哦!


本文名称:apache开启伪静态的方法-创新互联
本文地址:http://scyingshan.cn/article/coehcs.html