.htaccess 和 mod

编程入门 行业动态 更新时间:2024-10-15 16:23:18
本文介绍了.htaccess 和 mod_rewrite 出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试使用以下 .htaccess 值托管基于 php 的应用程序.

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

我不确定为什么会发生这种情况.任何帮助表示赞赏.

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

推荐答案

如果您最近升级到高于 2.2 的 Apache 版本,则 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的配置...

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 和 Allow 指令已替换为 Require 指令:

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

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

来源www.andrejfarkas/2012/06/fun-with-wamp-server-and-apache-2-4-2/httpd.apache/docs/2.4/upgrading.html

更多推荐

.htaccess 和 mod

本文发布于:2023-11-01 13:10:38,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549411.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:htaccess   mod

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!