今兒做完虛擬主機僞靜態頁,重啓apache的時候出現報錯
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration是沒有加載加載rewrite模塊
然後自己找apache配置文件httpd.conf文件裏:
LoadModule rewrite_module modules/mod_rewrite.so 但是沒有找到
三。查看apache編譯參數
沒有--enable-rewirte 這個參數,很是鬱悶
做虛擬主機規則重寫 都已經配置好了 想不編譯apache把那個模塊給加載上去
#cd /usr/local/src/httpd-2.2.11/modules/mappers/
# /usr/local/apache2/bin/apxs -i -a mod_rewrite.c
# /usr/local/apache2/bin/apxs -i -a mod_rewrite.slo
然後在apache配置文件裏添加LoadModule rewrite_module modules/mod_rewrite.so
## cd /usr/local/apache2/modules/ 修改相關文件的權限
然後重啓apache
over!!!!!!!!!!!!!!