Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
571 views
in Technique[技术] by (71.8m points)

.htaccess - CodeIgniter 3.0.0 Project doesn't work on sub domain

I created a project using CI(version 3.0.0), and it works perfectly in XAMPP localhost. And i upload that project to sub domain then its giving an error Click here.

I Handle Router's and config setting as well. So what is this error?? how to avoid this?? There are some answers, But not suit for this.

Config.php

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

Routes.php

$route['default_controller'] = 'shop';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

.htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Change the name of your controller, model, and other your class to Capitalize.

Example : your own controller test.php change to Test.php

It should be work.

Its because your server is Linux, and Linux is case sensitive.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...