Site only loading the default controller

Hi guys,

I made a website working on my local server (WAMP Server).
When I put it into a web host, I got a strange error.

This works:

Not works:

They don't even are recognized as classes by CI, the server(not CI) just gives a "Error 404 - page not found"

my base_url is ""

Which are the possibles options for this be happening?

I'm using CI 2.0.0
localhost: Windows 7
webhost: Linux, probably.

[eluser]Rok Biderman[/eluser]
I have a similar setup and this is a list of things i would check:
.htaccess (it works without the ? after the index.php on win hosts, but somehow fails otherwise)
there is some fiddling with either making
$config['uri_protocol'] = "AUTO";
$config['uri_protocol'] = "REQUEST URI";
for the .htaccess to work properly.
config/config.php settings
index.php settings

If it works on your dev environment, chances are very good the problem is in one of those. Basically on what you just told it has to be somewhere in the routing.

Now, that you mentioned about the "?", I set
$config['uri_protocol' = 'REQUEST_URI';
and tried "" and I worked fine.

Then I changed index_page
$config['index_page'] = 'index.php?';

And everything is normal now.

Thanks x 10, Coccodrillo!

Now, can you explain me why that happened?
And if possible, how can I remove that "index.php?" from my url?
I tried changing HTACCESS like this, but nothing has changed:
RewriteEngine on
RewriteCond $1 !^(index\.php?|images|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]

[eluser]Rok Biderman[/eluser]
Look, to avoid any confusion, i'll just show you what works for me:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond $1 !^(index\.php|pp|images|public|robots\.txt|css)
    RewriteRule ^(.*)$ ./index.php?/$1 [L]

$config['index_page'] = '';

$config['uri_protocol']    = "REQUEST_URI";

So, other than a missing dot in .htaccess and taking out the index.php, you should be good to go. If not, first check if you have any custom routes set up and if that is interfering.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.