没有用htaccess指定的输入文件

时间:2012-01-11 15:46:32

标签: .htaccess kohana

我在Kohana 2.3.x上运行了几个应用程序。今天我的托管服务提供商u了机器,我的网站停止运行。我试图打开网站时得到No input file specified。我发现.htaccess文件存在问题,尤其是我将index.php部分删除的规则...我需要为此提出紧急信息!谢谢。我的.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 个答案:

答案 0 :(得分:1)

您可能正在使用以CGI模式安装PHP的主机。

你可以试试这个:

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

或者这个:

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

此致