用的.htaccess和mod_rewrite的错误 [英] Error with .htaccess and mod_rewrite

查看:1188
本文介绍了用的.htaccess和mod_rewrite的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想举办一个PHP的应用程序有以下的.htaccess值。

I'm trying to host a php based application with the following .htaccess values.

Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php

RewriteEngine On
RewriteBase /easydeposit
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

不过,我一直面临着以下两个错误,

However, I keep facing the following two errors,

[access_compat:error] [pid 25330:tid 27] AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/system/
[access_compat:error] [pid 25330:tid 27]  AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/private/
[access_compat:error] [pid 25330:tid 27] AH01797: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/application/
[authz_core:error] [pid 25330:tid 27]  AH01630: client denied by server configuration: /home/abc/opt/apache/htdocs/xyz/.htaccess

我不知道为什么会这样。任何帮助是AP preciated。

I'm not sure why this is happening. Any help is appreciated.

推荐答案

如果您最近已经升级到Apache版本大于2.2的版本中,authz_core错误错误可能会从你的httpd.conf或的httpd-vhosts.conf现身文件中的<文件> 标签。 mod_authz_core中引入了Apache的2.3和更改的访问控制声明的方式。

If you have recently upgraded to a version of Apache greater than version 2.2, the authz_core error error might be coming from your httpd.conf or httpd-vhosts.conf file in the <Document> tags. mod_authz_core was introduced in Apache 2.3 and changed the way that access control is declared.

因此​​,例如,而不是配置的2.2方式&LT;目录&GT; ...

So, for example, instead of the 2.2 way of configuring <Directory>...

    <Directory "C:/wamp">
        Options Indexes FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>

订单允许指令已被替换在需要指令:

Order and Allow directives have been replaced with the Require directive:

    <Directory "C:/wamp">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

来源 <一href="http://www.andrejfarkas.com/2012/06/fun-with-wamp-server-and-apache-2-4-2/">http://www.andrejfarkas.com/2012/06/fun-with-wamp-server-and-apache-2-4-2/          <一href="http://httpd.apache.org/docs/2.4/upgrading.html">http://httpd.apache.org/docs/2.4/upgrading.html

Sources http://www.andrejfarkas.com/2012/06/fun-with-wamp-server-and-apache-2-4-2/ http://httpd.apache.org/docs/2.4/upgrading.html

这篇关于用的.htaccess和mod_rewrite的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆