国外空间出现No input file specified.的错误

2014 年 6 月 27 日4710

安装了一个iWebshop程序在国外的空间,安装一切正常,但是访问首页的时候发现,竟然是“No input file specified”错误。

其他页面没问题,方式index.php带参数也没问题,就是当直接访问域名出现这个错误。

http://site/index.php 正常

http://site/ 出现以上错误

难道是默认首页设置的问题?在cPanel下找了好久也没找到哪里可以调整“默认首页”,只好在“.htaccess”文件里面设置。

原来的“.htaccess”代码为:

<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond $1 !^(index\.php|robots\.txt|views|plugins|backup|upload|image|runtime|install)

RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

改成:

<IfModule mod_rewrite.c>

DirectoryIndex index.php index.html

RewriteEngine off

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond $1 !^(index\.php|robots\.txt|views|plugins|backup|upload|image|runtime|install)

RewriteRule ^(.*)$ index.php/$1 [L]

</IfModule>

就好了。

0 0