CodeIgniter default page on remote server CodeIgniter default page on remote server codeigniter codeigniter

CodeIgniter default page on remote server


You need to add a RewriteBase in your .htaccess file:

RewriteEngine onRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php?/$1 [L]

NOTE: I have added a ? after the index.php as well.

I would also set the follow to an empty string (after you have tried the above):

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

Finally, in your routes.php file:

$route['default_controller'] = 'sportstream';

Update

In application/config/database.php you need to change your database driver. On your localhost, MySQLi was the database driver set. On your remote server, however, MySQLi was not installed, so changing it to MySQL should fix the issue.

//old - works on local server$db['default']['dbdriver'] = 'mysqli';//new - works on remote server$db['default']['dbdriver'] = 'mysql';

For some reason, Codeigniter just "breaks" and shows the blank screen with no errors.


You have to set default controller in $route['default_controller'] ="sportstream"; it is located in aplication/config/route.php, So when visitinghttp://www.mysite.com/thesportstream` controller will be loaded by default.

Check about default controller in User guide

Switch back the $config['index_page'] = '';

If you renamed the index.php then you must enter the index_page name in config or else you can keep it blank.

Recommended Codeigniter starter guide: http://net.tutsplus.com/tutorials/php/codeigniter-basics/