【发布时间】:2014-03-14 06:33:57
【问题描述】:
我在我的项目中使用 tank auth。在我的本地主机中,它工作正常。但是当我将项目上传到服务器时,我收到了错误
没有指定输入文件。
我知道这是因为 htaccess。我的网址就像http://example.org/project/test/tankauth/。当我给出这个 url 时,它会重定向到 http://example.org/project/test/tankauth/index.php/auth/login 并出现错误。但是,如果我尝试使用http://example.org/project/test/tankauth/index.php?/auth/login 之类的网址,它将正常工作。
我的htaccess文件如下图:
RewriteEngine on
RewriteBase /tankauth/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
我不擅长htaccess。
【问题讨论】:
-
检查 mod_rewrite 是否启用?
-
将
$config['index_page'] = 'index.php';更改为$config['index_page'] = '';
标签: php .htaccess codeigniter tankauth