【发布时间】:2018-02-18 10:09:12
【问题描述】:
我对消息no input file specified 有疑问。
我在 stackoverflow 的主题上找到了解决这个变化的方法
RewriteRule ^(.*)$ index.php/$1 [L] 到 RewriteRule ^(.*)$ index.php?/$1 [L]
在 index.php 后添加问号
它奏效了。
一切看起来像:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
但是为什么这有效?在index.php 之后添加的问号实际上是什么意思?为什么这会让一切正常?
我一直在寻找和搜索有关此类所有主题的答案,但没有找到任何可以回答我问题的内容。
我只发现它 probably 有效并且是必需的,因为 index.php 不在根目录中,但我不确定。
我的目录如下:
/ (root folder)
--->application (app folder of framework)
--->myDomain.dx.am (my domain folder)
-------->index.php
-------->.htaccess (htaccess here)
-------->other_files
...................
--->system (system folder of framework)
我只寻求这个答案,我很好奇,我想知道为什么会这样以及如何工作?
【问题讨论】:
-
您可能需要使用“Apache”进行标记,以便具有良好 Apache 经验的人会告诉您,但这一切都归结为服务器配置,甚至可能是服务器正在使用的特定 Apache 版本。
标签: php .htaccess codeigniter mod-rewrite