Link to home
Start Free TrialLog in
Avatar of xmodulus
xmodulus

asked on

Codeigniter App showing 404 page when used on my linux server

Hello experts,

I've been working on a codeigniter app. I use wampserver to develop it (works fine on localhost), but after moving it online, I get a 404 page.
I have no idea what the problem is, I've tried everything I know, including:

- Setting $config['index_page'] to both $config['index_page'] = '' AND $config['index_page'] ='index.php' (Both options don't work)

- Ensuring that mod_rewrite is enabled.

- Using various .htaccess configs.
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

This same thing happens to me almost everytime I move a CodeIgniter site from development to production: I alway forget to update $config['base_url'] in application/config/config.php file. Can be this for you also?
Avatar of xmodulus
xmodulus

ASKER

I have tried that, I changed the base_url to my online url too
This is my .htaccess

DirectoryIndex index.php

# Rewrite engine
RewriteEngine On

# condition with escaping special chars
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php?$1 [L,QSA]

Open in new window


I don't use index.php so I have

$config['index.php'] = '';

But if all was good in your local server and if you haven't changed nothing in your route.php, the only place where to look for a solution seems to be config.php...
Can you post the exact message error or a link to the live site and the code of your config.php?
ASKER CERTIFIED SOLUTION
Avatar of Loganathan Natarajan
Loganathan Natarajan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Meaning file names or the actualy class name declared at the start of controllers? What about referencing other classes in another controller?
Thanks alot, that worked! All my controller and model filenames now start with an uppercase letter and everything works perfectly.
More details here, http://www.codeigniter.com/userguide3/general/controllers.html

I too had the same issue on my linux hosting server. I did not have any issue in my local windows. So I gone through this and fixed.

On CodeIgniter 3.0.x , they're making some conventions as per the manual given.