htaccess 未指定输入文件
我有几个应用程序在 Kohana 2.3.x 上运行。今天,我的托管提供商升级了机器,我的网站停止运行。尝试打开网站时,我收到未指定输入文件
。我发现 .htaccess
文件有问题,尤其是我驱逐 index.php 部分的规则......我需要紧急 fi !谢谢。我的 .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]
然后网站将打开。怎么了?
I have several applications running on Kohana 2.3.x. Today my hosting provider u pgraded the machines and my sites stopped running. I get the No input file specified
when trying to open website. I figures out there is something wrong with .htaccess
file especially the rule where I oust index.php part... I need urget fi for this! Thank you. My .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
If I comment this part RewriteRule ^(.*)$ index.php/$1 [PT,L]
then site opens. What is wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能您使用的主机以 CGI 模式安装了 PHP。
您可以尝试这个:
或者这个:
问候
Probably you are using a host with PHP installed in CGI mode.
You can try this:
or this:
Regards