2012-01-11 110 views
0

我有幾個應用程序在Kohana 2.3.x上運行。今天,我的託管服務提供商將機器和網站停止運行。試圖打開網站時,我收到了No input file specified。我發現.htaccess文件出現了問題,特別是我不喜歡使用index.php部分的規則......我需要對此進行強制性編程!謝謝。我的.htaccess:沒有用htaccess指定輸入文件

# Turn on URL rewriting 
RewriteEngine On 

# Put your installation directory here: 
# If your URL is www.example.com/kohana/, use /kohana/ 
# If your URL is www.example.com/, use/
RewriteBase/

# Protect application and system files from being viewed 
RewriteCond $1 ^(system) 

# Rewrite to index.php/access_denied/URL 
RewriteRule ^(.*)$ index.php/access_denied/$1 [PT,L] 

# Allow these directories and files to be displayed directly: 
# - index.php (DO NOT FORGET THIS!) 
# - robots.txt 
# - favicon.ico 
# - Any file inside of the images/, js/, or css/ directories 
RewriteCond $1 ^(index\.php|robots\.txt|sitemap\.xml|favicon\.ico|static/images|static/js|static/css|static/tutorials|upload) 

# No rewriting 
RewriteRule ^(.*)$ - [PT,L] 

# Rewrite all other URLs to index.php/URL 
RewriteRule ^(.*)$ index.php/$1 [PT,L] 
#AddHandler application/x-httpd-php5 .php 

如果我評論這一部分RewriteRule ^(.*)$ index.php/$1 [PT,L]然後網站打開。哪裏不對?

回答

1

可能您正在使用安裝在CGI模式下的PHP主機。

你可以試試這個:

RewriteRule ^(.+)$ index.php?$0 [PT,L,QSA] 

或本:

RewriteRule ^(.+)$ index.php?kohana_uri=$1 [L] 

問候

相關問題