【发布时间】:2014-09-11 00:27:47
【问题描述】:
我在子域中安装了GitList (PHP FastCGI 5.4.29)。默认安装自带以下.htaccess:
<IfModule mod_rewrite.c>
Options -MultiViews +SymLinksIfOwnerMatch
RewriteEngine On
#RewriteBase /path/to/gitlist/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L,NC]
</IfModule>
<Files config.ini>
order allow,deny
deny from all
</Files>
当我尝试访问 http:/subdomain.company.com 时,出现以下错误:
没有指定输入文件。
我猜PATH_INFO 为空时会出现错误,但我不知道如何修复它。如果我访问http:/subdomain.company.com/index.php,应用程序就可以正常工作。
这是目录结构,如果有帮助的话:
-rw-r--r-- 1 iosystit psacln 435 Jun 30 05:07 boot.php
drwxrwxrwx 3 iosystit psacln 4096 Jul 20 04:09 cache
-rw-r--r-- 1 iosystit psacln 831 Jul 20 11:14 config.ini
-rw-r--r-- 1 iosystit psacln 975 Jun 30 05:07 config.ini-example
-rw-r--r-- 1 iosystit psacln 291 Jun 30 05:07 .htaccess
-rw-r--r-- 1 iosystit psacln 690 Jun 30 05:07 index.php
-rw-r--r-- 1 iosystit psacln 2505 Jun 30 05:07 INSTALL.md
-rw-r--r-- 1 iosystit psacln 1477 Jun 30 05:07 LICENSE.txt
-rw-r--r-- 1 iosystit psacln 5358 Jun 30 05:07 README.md
drwxr-xr-x 3 iosystit psacln 4096 Jun 30 05:07 src
drwxr-xr-x 4 iosystit psacln 4096 Jun 30 05:07 themes
drwxr-xr-x 16 iosystit psacln 4096 Jul 20 04:05 vendor
编辑:我接受了答案,因为链接 No input file specified 指向我的解决方案,但我没有使用 nginx:
RewriteRule ^(.*)$ index.php?/$1 [L,NC]
【问题讨论】:
标签: php apache .htaccess fastcgi