.htaccess: 無効なコマンド 'RewriteEngine'。スペルミスか、サーバー構成に含まれていないモジュールによって定義されている可能性があります。質問する

.htaccess: 無効なコマンド 'RewriteEngine'。スペルミスか、サーバー構成に含まれていないモジュールによって定義されている可能性があります。質問する

ローカルでphpファイルを参照しようとするとこのエラーが発生します

[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/

何が問題ですか ?

ベストアンサー1

アパッチ 2+以下のように簡単に実行できます (Linux ターミナルを使用)。

sudo a2enmod rewrite && sudo service apache2 restart

または

sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart

おすすめ記事