I am using cPanel and Apache, and I am seeing the following error in my 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
My project is based on PHP 5.3 using the zend framework. My .htaccess
file contains:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Can anyone tell me what causes this error and how should I alter my .htaccess
file to resolve this?
my webhost manager picture
Best Answer
Check your options. You must have
to enable per-directory rewrite rules.
http://httpd.apache.org/docs/current/mod/mod_rewrite.html#RewriteRule
You may be able to put the "Options +FollowSymLinks" directive in the same .htaccess file, if your server-level config allows it. The server-level config must set the "AllowOverride" directive to "all" or it must contain "Options" or "Options=FollowSymLinks" to allow you to do this. See http://httpd.apache.org/docs/current/mod/core.html#allowoverride
So, at least try with this as your .htaccess file:
If that doesn't work, you'll need to dig up your server config and modify the options there.