htaccess的:无效命令'RewriteEngine叙述',也许通过一个模块拼错或定义不包括在服务器配置 [英] .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
问题描述
试图在本地浏览PHP文件时,我有这个错误
[周五4月13日19时十六分40秒2012] [警惕] [客户端127.0.0.1] C:/AppServ/www/hr-website/.htaccess:无效的命令'RewriteEngine叙述http://127.0.0.1/:',也许不包含在服务器结构的模块,引荐拼错或限定
这是什么问题?
或由不包含在服务器结构的模块中定义
块引用>检查以确保您已启用了mod_rewrite。
从:<一href=\"http://www.astahost.com/info/tiistm-apache-tutorial-enable-mod-rewrite-windows-action-guide-enable-mod-rewrite-windows.html\">http://www.astahost.com/info/tiistm-apache-tutorial-enable-mod-rewrite-windows-action-guide-enable-mod-rewrite-windows.html
- 找到httpd.conf文件(通常你会发现一个名为CONF,配置或类似的规定文件夹中)
- 在httpd.conf文件注释行的LoadModule rewrite_module模块/ mod_rewrite.so(从行前面删除井'#'号)
- 还可以找到行ClearModuleList下面是注释掉然后查找并确保该行加入AddModule mod_rewrite.c没有被注释掉。
如果在
的LoadModule rewrite_module模块/ mod_rewrite.so
线从httpd.conf文件全部丢失,只需添加它。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 ?
解决方案or defined by a module not included in the server configuration
Check to make sure you have mod_rewrite enabled.
- Find the httpd.conf file (usually you will find it in a folder called conf, config or something along those lines)
- Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/mod_rewrite.so (remove the pound '#' sign from in front of the line)
- Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.
If the
LoadModule rewrite_module modules/mod_rewrite.so
line is missing from the httpd.conf file entirely, just add it.这篇关于htaccess的:无效命令'RewriteEngine叙述',也许通过一个模块拼错或定义不包括在服务器配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!