Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have this error when trying to browse php files locally

[Fri Apr 13 19:16:40 2012] [alert] [client 127.0.0.1] C:/AppServ/www/hr-website/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://127.0.0.1/ 

what is the problem ?

like image 617
Adham Avatar asked Apr 13 '12 16:04

Adham


1 Answers

Under Apache 2+ you can simply do as below (Using Linux Terminal):

sudo a2enmod rewrite && sudo service apache2 restart 

or

sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart 
like image 181
scibuff Avatar answered Sep 18 '22 13:09

scibuff