Zend .htaccess配置在Ubuntu中不起作用

时间:2010-10-19 11:20:41

标签: zend-framework apache2 ubuntu-10.04

您好我正在运行Ubuntu 10.04 LTS - Lucid Lynx 我通过

创建一个项目

创建项目测试

此命令会自动生成一个无效的.htaccess文件 我通过编辑配置了我的网络服务器(Apache2) / etc / apache2 / sites-available / default文件 设置

<Directory /var/www/>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
</Directory>

我收到以下错误

Internal Server Error
/**************************************************************************************/
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.14 (Ubuntu) Server at localhost Port 80
/****************************************************************************************/

请帮帮我

1 个答案:

答案 0 :(得分:16)

您尚未加载mod_rewrite,因此Apache不知道RewriteEngine行的含义。

在ubuntu上你可以做(​​作为超级用户):

a2enmod rewrite
apache2ctl restart

否则你必须编辑apache配置并添加这样的一行来加载模块

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

系统上的路径可能不同。