1

I get these errors in my apache error log file:

[Fri May 20 16:17:06 2011] [notice] Apache/2.2.17 (Ubuntu) PHP/5.3.5-1ubuntu7.2 with Suhosin-Patch configured -- resuming normal operations
[Fri May 20 16:17:11 2011] [alert] [client 127.0.0.1] /home/zomerovic/vhosts/brillelook/public_html/.htaccess: Invalid command 'RewriteCond', perhaps misspelled or defined by a module not included in the server configuration
[Fri May 20 16:17:12 2011] [alert] [client 127.0.0.1] /home/zomerovic/vhosts/brillelook/public_html/.htaccess: Invalid command 'RewriteCond', perhaps misspelled or defined by a module not included in the server configuration
[Fri May 20 16:17:12 2011] [alert] [client 127.0.0.1] /home/zomerovic/vhosts/brillelook/public_html/.htaccess: Invalid command 'RewriteCond', perhaps misspelled or defined by a module not included in the server configuration
[Fri May 20 16:17:12 2011] [alert] [client 127.0.0.1] /home/zomerovic/vhosts/brillelook/public_html/.htaccess: Invalid command 'RewriteCond', perhaps misspelled or defined by a module not included in the server configuration

But I have enabled mod_rewrite, and aswell as other apache mod's (as a2dismod says):

Your choices are: auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex cgi deflate dir env headers mime negotiation php5 reqtimeout setenvif status vhost_alias

Is there a conflict with RewriteCond with some of the other mod's, or I'm missing something?

Thanks.

2 Answers 2

5

Run

a2enmod rewrite
/etc/init.d/apache2 restart

And it will load the rewrite module for you

the error you are seeing is not because you dont have permissions to use rewrite but because its not available as can be seen from the a2dismod list output you provided (its not appearing in the list)

0

Are you able to use mod_rewrite in your .htaccess file?

See AllowOverride FileInfo

4
  • No! :( I cannot... should I add this AllowOverride to the Directory directive in my .htaccess?
    – metaforce
    May 20, 2011 at 14:36
  • According to httpd.apache.org/docs/2.2/mod/core.html#directory the directory directive must be in the vhost (or main server config). May 20, 2011 at 14:53
  • actually, I'm using the VirtualDocumentRoot to point the specific host to a specific directory... does that make any difference from Directory directive?
    – metaforce
    May 20, 2011 at 14:55
  • all I meant is that <Directory> can't go into .htaccess as far as I'm aware. May 20, 2011 at 15:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .