CodeIgniter has a robust routing module as part of its MVC architecture. A trap for the inexperienced arises when the default controller works (e.g. site.com) but anything else such as mysite.com/dashboard goes to a server based 404, not the CodeIgniter one.
Solution: in your config.php file ensure this line is present
and place the following code in an .htacess file
# Set the default file for indexes
# activate URL rewriting
# do not rewrite links to the documentation, assets and public files
RewriteCond $1 !^(images|assets|uploads|captcha)
# do not rewrite for php files in the document root, robots.txt or the maintenance page
RewriteCond $1 !^([^\..]+\.php|robots\.txt|maintenance\.html)
# rewrite everything else
RewriteRule ^(.*)$ index.php/$1 [L]
# If we don’t have mod_rewrite installed, all 404′s can be sent to index.php, and everything works as normal.
ErrorDocument 404 index.php