Posted on 2010-04-05 19:49
BZ 閱讀(1356)
評(píng)論(2) 編輯 收藏 所屬分類:
Misc
在使用Access File時(shí),頁面出現(xiàn)500 Internal Error. 檢視Apache錯(cuò)誤日志是發(fā)現(xiàn): .htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration.
Google后才發(fā)現(xiàn), RewriteEngine命令需要rewrite mod的支持。從而, 做如下修復(fù):
$>cd /etc/apache2/mods-enabled 切換到apache下的mods-enabled目錄
$>sudo ln -s ../mods-available/rewrite.load rewrite.load 啟用rewrite mod
$>sudo /etc/init.d/apache2 restart 重啟apache服務(wù)器
注:rewrite.load的內(nèi)容為: LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so 也就是加載mod_rewrite模塊。