zoukankan      html  css  js  c++  java
  • htaccess不起作用的解决方法,AllowOverride All打开后出现403错误时解决办法

    在php程序的目录下有一个htaccess文件,这个文件起着对url重写的作用,但是不巧的,在我的应用程序里不起作用,baidu了一下,发现是

    AllowOverride All,  这个选项没有打开,

    这个选项,只能写在

    <Directory />

    </Directory>中,我在http.conf中打开了这个选项,结果网站出现了403禁止访问的错误,经查看,结果发现是

    <Directory />
    Options Indexes
    AllowOverride None
    #AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>

    不应在/这个目录下,写这个选项,应在应用程序的目录下打开这个选项,

     写到www目录下

    <Directory "http://www.cnblogs.com/WebRoot/Default"> 这里的相对目录是对于配置文件中的ServerRoot而言.
     
    #
    # 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 All
     
    #
    # Controls who can get stuff from this server.
    #
        Order allow,deny
        Allow from all
     
    </Directory>

     如果打开了这个选项,还不起作用,那么就得检查一下httpd.conf中打开了rewrite选项了没有

    LoadModule rewrite_module modules/mod_rewrite.so

  • 相关阅读:
    驰骋工作流引擎2016年第1次组团培训日程
    CCBPM中流程回滚的介绍
    CCBPM流程变更处理解决方案与对策
    CCBPM多表单流程中关于绑定表单的设计步骤
    CCBPM关于工作流引擎取回审批的设计方案与实现过程
    线程池 -实现线程复用
    线程安全 -同步锁机制
    匿名内部类创建线程,简化线程创建代码
    Thread -线程的两种创建方式
    Throwable -抛出异常类与自定义异常类
  • 原文地址:https://www.cnblogs.com/rainblack/p/5356990.html
Copyright © 2011-2022 走看看