0

I have a Codeigniter project which works fine on Localhost. Now i upload it on live server.But it gives me 404 Page Not Found error. i have uploaded it into www.mydomain.com/city/ folder .So far i configured database name,password in application/config/database.php and change the base_url to www.mydomain.com/city/ in application/config/config.php

my .htaccess looks like

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

Anybody help please?

Riyadh Ahmed
  • 1,139
  • 1
  • 9
  • 17

2 Answers2

0

may be file permission issue. take login to your cpanel of server and see the error log for 404 number error

0

As Dray said in the comment section, your Controller names have to be capital letter in the url aswell as in the code (classname) and Filename.

See: Codeigniter Class and filename case sensitive on Linux (centos)

I assume you developed on a Windows machine (where it worked flawlessly despite the faulty case) and migrated you project to a Linux live server. I also fell for it when I moved to a Linux server.

Community
  • 1
  • 1
sovrin
  • 11
  • 3
  • Is i have to call the controller from menu or other place(with capitalize controller name) like controller/function to Controller/function if i use capital letter of a controller file name – Riyadh Ahmed Jan 13 '16 at 10:37
  • No, it is not obligated. You can use strtolower route values as well. – Tpojka Jan 13 '16 at 11:32