在Codeigniter中的第一页之后“找不到文件”

问题描述 投票:0回答:1

在localhost我的网站运行正常,我在测试服务器中发布后,它不起作用,它打印出来:

enter image description here

我的登录页面运行没有问题...

enter image description here

但在我点击“登录”后,我收到错误,但网址是正确的...

enter image description here

我的config.php

$config['base_url'] = 'http://merge.***.it/merge/';
$config['index_page'] = 'index.php';

routes.php文件

$route['default_controller'] = 'auth/login';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
php codeigniter continuous-integration
1个回答
0
投票

试试这个。在index_page中填空。

$config['index_page'] = '';

并在根文件夹中使用.htaccess

RewriteEngine on
RewriteCond $1 !^(index\.php|phpinfo\.php|Charts|assets|uploads|application|sitemap\.xml|robots\.txt|gyan\.rss)
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
© www.soinside.com 2019 - 2024. All rights reserved.