[請益] Internal Server Error cakephp htaccess

看板PHP作者 (加油加油^^)時間13年前 (2012/05/25 17:32), 編輯推噓1(103)
留言4則, 1人參與, 最新討論串1/2 (看更多)
各位先進HELLO 小弟今天在搬移一個cakephp專案的時候 想要複製一份到別的主機使用 卻發現Internal Server Error這個錯誤。 GOOGLE查到應該是htaccess裡面有問題 但是,原本的專案就是這樣子阿 應該是沒問題的 ----以下是該檔案內容 <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /~kiang/test/ RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$1 [L] </IfModule> ---------------------------- 可以看到那個kiang 我也的確是建了一個使用者kiang把網站送到裡面 查了一下error log 寫了如下的訊息 也只有這個訊息 Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace. 網路上是說,因為這個形成了一個錯誤的迴圈 一直重複指引轉址才會這樣。 我基本上嘗試了兩個方向。 1.去httpd.conf裡面修改AllowOverride ALL 2.有檢查htaccess裡面有沒有奇怪的文字 例如說BOM 或是破碎的碼 不知道有沒有人可以解決我的問題? 真的很需要解決 500P奉上 謝謝 -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.250.248.62

05/25 17:49, , 1F
solution 1)在 httpd.conf 文件最後加上以下代碼︰
05/25 17:49, 1F

05/25 17:49, , 2F
LoadModule rewrite_module modules/mod_rewrite.so
05/25 17:49, 2F

05/25 17:50, , 3F
solution 2)發現ZendServer\etc\ZendEnablerConf.xml中開頭
05/25 17:50, 3F

05/25 17:51, , 4F
是一段亂碼,將其改成以“<?xml" 開頭再 restart apache
05/25 17:51, 4F
文章代碼(AID): #1Flr7Atl (PHP)
文章代碼(AID): #1Flr7Atl (PHP)