【发布时间】:2012-06-08 07:42:14
【问题描述】:
我正在尝试设置一个非常简单的 mod_rewrite .htaccess:
RewriteEngine on
RewriteRule ^contact$ contact.php
RewriteRule ^contact/$ contact.php
但是当我上传 .htaccess 文件时,我得到一个内部服务器错误。发生了什么?
我刚刚检查了httpd.conf文件,mod_rewrite模块在这里,没有任何#。此外 mod_rewrite 正在与服务器中的另一个域一起使用(我没有使用过这个域)。
有没有办法按域激活 mod_rewrite 域?我怎样才能激活它?非常感谢。
编辑:
我刚刚检查了 apache 错误日志,我得到了这个:
[Fri Jun 08 09:36:05 2012] [alert] [client 87.216.xxx.xxx] /var/www/vhost/domain.com/home/html/.htaccess: RewriteEngine not allowed here
有什么线索吗?谢谢。
【问题讨论】:
-
查看错误日志以了解具体问题是什么
-
刚刚检查了错误日志,我将错误添加到问题中。
标签: apache mod-rewrite