0

I'm trying to setup a very very simple mod_rewrite .htaccess:

RewriteEngine on
RewriteRule ^contact$ contact.php
RewriteRule ^contact/$ contact.php

But when I upload the .htaccess file, I get an Internal Server Error. What are happening?

I just checked the httpd.conf file, and the mod_rewrite module is here, without any #. Also the mod_rewrite is working with another domain in the server (I didn't worked with this domain).

Is any way to activate the mod_rewrite domain by domain maybe? How can I activate it? Thank you very much.

EDIT:

I just checked the apache error log, I'm getting this:

[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

Any clue? Thanks.

4

2 回答 2

0

Generally that means that on server/vhost level, in the main configuration file, or in a .htaccess file higher up there will be an 'AllowOverride' blocking.

Check higher directories for .htaccess files with AllowOverride/Options changes - and then check the main httpd.conf files (http://httpd.apache.org/docs/2.0/mod/core.html#allowoverride - Options).

Dw

于 2012-06-08T09:42:31.957 回答
-1

Seems like mod_rewrite is not enabled.

于 2012-06-09T09:36:01.847 回答