Home > apache > Apache error log: Invalid command ‘RewriteEngine’

Apache error log: Invalid command ‘RewriteEngine’

After adding the “RewriteEngine on”  on an .htaccess file, I got the following error in apache’s error.log:


.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

To fix it, I’ve added the rewrite module to apache:


$ sudo a2enmod rewrite

$ sudo /etc/init.d/apache2 restart

 

Categories: apache Tags: , ,
  1. September 17, 2018 at 18:00

    how we do this if we are using windows server? surely i cant do sudo in windows 2008

    Like

  2. May 1, 2016 at 14:37

    There is no rewrite mod in the box. What to do ?

    Like

  3. Artur
    March 23, 2016 at 15:56

    Thankyou very much!

    Like

  4. Vyacheslav
    December 29, 2013 at 4:55

    Thank you!

    Like

  5. amdholic
    November 16, 2013 at 0:42

    It works. Thanks for ur help…. 🙂

    Like

  1. No trackbacks yet.

Leave a comment