404 显示 index.php 在 codeigniter 中删除时间

404 showing index.php removing time in codeigniter

已经工作的项目我将下载并到另一台服务器更改所有内容但显示 404 和 index.php 添加到配置工作

下面是我的 .htacess 文件:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]
</IfModule>

我尝试了其他重写代码但无法使用我的配置文件

$config['base_url'] = '';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

但一直显示 404 为什么本地不工作

您的 .htaccess 文件应该是这样的:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/ [L]

在你的config.php

/* for server */
$config['base_url'] = 'http://silhouetteframes.in/';

 /* for localhost*/
$config['base_url'] = 'http://localhost/app_folder/'; 
$config['index_page'] = '';