apache Invalid command 'RewriteEngine'

访问页面出现500错误:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

 

查看apache的错误日志发现:

C:/wamp/www/xxxx/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://127.0.0.1/

 

问题原因是模块ewrite_module没有加载(apache默认不加载此模块),在httpd.config中,将#LoadModule rewrite_module modules/mod_rewrite.so前面的#去掉。然后保存、重启Apache,问题解决。

你可能感兴趣的:(command)