如何解决Apache错误“客户端被服务器configuration拒绝”?

我正在使用cPanel和Apache,我在我的error_log看到以下错误:

[Wed Feb 02 09:06:04 2011] [error] [client 110.34.4.242] client denied by server configuration:/home/websmart/public_html/.htaccess

我的项目是基于PHP 5.3使用zend框架。 我的.htaccess文件包含:

 RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] 

谁能告诉我是什么原因导致这个错误,我应该如何改变我的.htaccess文件来解决这个问题?

我的虚拟主机经理图片 在这里输入图像说明

检查你的select。 你必须有

 Options +FollowSymLinks 

启用每个目录的重写规则。

http://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteRule

如果您的服务器级configuration允许,您可以将“Options + FollowSymLinks”指令放在相同的.htaccess文件中。 服务器级configuration必须将“AllowOverride”指令设置为“all”,或者必须包含“Options”或“Options = FollowSymLinks”以允许您执行此操作。 请参阅http://httpd.apache.org/docs/current/mod/core.html#allowoverride

所以,至less试试这个.htaccess文件:

 Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] 

如果这不起作用,你需要挖掘你的服务器configuration,并修改那里的选项。