Php 代码点火器站点移动到localhost以激活

Php 代码点火器站点移动到localhost以激活,php,.htaccess,codeigniter,mod-rewrite,Php,.htaccess,Codeigniter,Mod Rewrite,我已经使用codeigniter创建了一个网站,它在我的本地主机上运行良好。CI项目路径为。我对以下文件做了以下修改。数据库连接正常 .htaccess文件 *******服务器已启用修改重写功能。************* 在我尝试访问我的站点后,它给出了404notfound错误 找不到 在此服务器上找不到请求的URL/themes/NPOS/login 原因是什么,请提供任何建议。在config.php中,执行此更改 路径:config/config.php 然后在database.php

我已经使用codeigniter创建了一个网站,它在我的本地主机上运行良好。CI项目路径为。我对以下文件做了以下修改。数据库连接正常

.htaccess文件

*******服务器已启用修改重写功能。*************

在我尝试访问我的站点后,它给出了404notfound错误

找不到

在此服务器上找不到请求的URL/themes/NPOS/login


原因是什么,请提供任何建议。

在config.php中,执行此更改

路径:
config/config.php

然后在database.php中

路径:
config/database.php

如果CI 2.0

$db['default']['hostname'] = 'localhost';//if cPanel this will be loacalhost
$db['default']['username'] = '';//username which create by server
$db['default']['password'] = '';//password
$db['default']['database'] = '';//database name
如果CI 3.0

$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => '',//username which create by server
    'password' => '',//password
    'database' => '',//database name
如果CPanel托管,您可以通过数据库向导打开

然后.htaccess文件将被删除(该文件应位于应用程序文件夹之外)


重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php/$1[L]

尝试
主题/NPOS/
而不是
/themes/NPOS/
@Umair已尝试,但未在
中运行缺少的
重写引擎。htaccess
$config['base_url'] = '';
$config['index_page'] = '';
$config['encryption_key'] = '123';
$db['default']['hostname'] = 'localhost';//if cPanel this will be loacalhost
$db['default']['username'] = '';//username which create by server
$db['default']['password'] = '';//password
$db['default']['database'] = '';//database name
$db['default'] = array(
    'dsn'   => '',
    'hostname' => 'localhost',
    'username' => '',//username which create by server
    'password' => '',//password
    'database' => '',//database name
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>