仅适用于真正的服务器

仅适用于真正的服务器

本文介绍了codeigniter 404找不到的index.php(仅适用于真正的服务器,而不是虚拟服务器上)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作的网页中,codeIgniter。我现在只是把它上传到我的网络服务器,它给了我一个404错误。

I got a working webpage with CodeIgniter. I did now just upload it to my webserver and it gives me a 404 error.

在浏览器的地址是web-page.com/folder/en/about

The browser address is "web-page.com/folder/en/about"

在配置的baseURL时是网页/文件夹/

The baseurl in the config is "web-page/folder/"

另外这是在config.php中,我曾尝试AUTO,但它并不能工作。

Also this is in the config.php, I did try AUTO but it does not work either.

$config['index_page'] = "";
$config['uri_protocol'] = "QUERY_STRING";

在index.php是web-page.com/folder /

The index.php is in "web-page.com/folder/"

我的htaccess是在web-page.com/folder/.htaccess

My htaccess is in "web-page.com/folder/.htaccess"

在的.htaccess的内容是

The content of the .htaccess is

AddCharset utf-8 .css .html .xhtml
Options +FollowSymlinks
RewriteEngine on
RewriteBase  /folder/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|images|media|layout|css|libs|robots\.txt)
RewriteRule ^(.*)$ /folder/index.php?/$1 [L]

你有任何提示,任何想法,我能尝​​试做?我没有检查所有的权利,即使有777这是行不通的。

Do you have any tip, any idea, what can I try to do? I did check all the rights, even with 777 it does not work.

在此先感谢。

卢卡斯

推荐答案

欧凯,愚蠢,愚蠢的我。我知道了。

Okey, stupid, stupid me. I got it.

错误是在我的routes.php文件我hadt为小写字母从

The error was in my "routes.php" I hadt to lowercase the default controller from

$route['default_controller'] = "Base";

$route['default_controller'] = "base";

我的脱机服务器就与它虽然工作。感谢您的支持。

My offline server did work with it though. Thanks for the support.

这篇关于codeigniter 404找不到的index.php(仅适用于真正的服务器,而不是虚拟服务器上)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-07 00:35