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

最近apache服务器出现

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

访问页面出现500错误:

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

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

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

 » 本站地址:http://www.gomoth.com

标签: