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.php
排查:apache
1:打開apache的錯誤日誌D:\wamp\logs\apache_error.log,若是出現Invalid command 'RewriteEngine', 那說明apache沒有開啓rewrite模式ide
解決:網站
1:打開Apache安裝目錄下httpd.conf,搜索「LoadModule rewrite_modulemodules/mod_rewrite.so」,找到這一行,去掉前面的「#」;
2:找到「AllowOverride None」改成「AllowOverride All」 有兩個地方須要修改
3:新建.haccess文件,放在當前網站根目錄下,在.haccess文件中寫僞靜態規則,好比:this
<IfModule mod_rewrite.c>spa
RewriteEngine on日誌
RewriteCond %{REQUEST_FILENAME} !-dorm
RewriteCond %{REQUEST_FILENAME} !-fserver
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]it
</IfModule>
4:重啓apache