0
我有一個用Kohana框架編寫的整個網站,它不是由我寫的,我只是在很長一段時間幫助啓動它,它是在2009年寫的,如果我是對的。白頁,在Kohana中沒有錯誤
所以,我上傳的所有文件,插入MySQL數據也做了配置,我去的網站:
adress.com並重定向到adress.com/index.php/lt
但那麼我只看到白頁,沒有標題,什麼都沒有。 Kohana的日誌顯示:
2012-08-26 22:56:48 +03:00 --- debug: Auth Library loaded
2012-08-26 22:56:48 +03:00 --- debug: MySQL Database Driver Initialized
2012-08-26 22:56:48 +03:00 --- debug: Database Library initialized
2012-08-26 22:56:49 +03:00 --- debug: Global GET, POST and COOKIE data sanitized
2012-08-26 22:56:49 +03:00 --- debug: Session Cookie Driver Initialized
2012-08-26 22:56:49 +03:00 --- debug: Session Library initialized
2012-08-26 22:56:49 +03:00 --- debug: Auth Library loaded
2012-08-26 22:56:49 +03:00 --- debug: MySQL Database Driver Initialized
2012-08-26 22:56:49 +03:00 --- debug: Database Library initialize
然後服務器日誌顯示:
[Sat Aug 25 12:51:47 2012] [error] [client 94.244.82.207] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
[Sat Aug 25 12:51:48 2012] [error] [client 94.244.82.207] mod_rewrite: maximum number of internal redirects reached. Assuming configuration error. Use 'RewriteOptions MaxRedirects' to increase the limit if neccessary.
下面是.htaccess文件:
# Turn on URL rewriting
RewriteEngine On
# Installation directory
RewriteBase /sporttv/
# Protect application and system files from being viewed
RewriteRule ^(application|modules|system) - [F,L]
# Protect .git files
RewriteRule ^.git - [F,L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT,L]
在'application/bootstrap.php'中查找'base_url'配置選項值。同樣在你的'.htaccess'中,ypu有'RewriteBase/sporttv /' - 這是正確的嗎? 「 –
」破折號表示不應該執行替換(現有路徑是通過未觸及的方式傳遞的)。當需要應用標誌(請參見下文)而不更改路徑時,將使用此標誌。 - [mod_rewrite文檔](https://httpd.apache.org/docs/current/mod/mod_rewrite.html)。將短劃線替換爲「index.php/$ 0」讓kohana處理這些短片並實際保護這些文件。 – Darsstar