【发布时间】:2015-06-30 03:41:50
【问题描述】:
我已经使用 codeigniter 创建了网站,它在我的本地主机中运行良好。 CI 项目路径是 http://www.xxxxxxx.com/themes/NPOS。我对以下文件进行了以下修改。数据库连接正常。
.htaccess 文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /themes/NPOS/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
config.php
$config['base_url'] = 'http://www.xxxxxxx.com/themes/NPOS/';
* ******服务器启用了 mod_rewrite。********* *
在我尝试访问我的网站后,它给出了 404 Not found 错误
找不到
在此服务器上找不到请求的 URL /themes/NPOS/login。
是什么原因,请给点建议。
【问题讨论】:
-
试试
themes/NPOS/而不是/themes/NPOS/ -
@Umair 试过了,但没用
-
您的
.htaccess中缺少RewriteEngine On
标签: php .htaccess codeigniter mod-rewrite