Welcome Guest, Not a member yet? Register   Sign In
index.php shows error when setting enable_query_strings to True
#1

in my config.php I have set the enable_query_strings = TRUE

as it will be much easier to display images.

so my url is something like:

localhost/ci/index.php?c=welcome

If I call localhost/ci/index.php?c=welcome or localhost/ci/index.php?c=welcome&m=index it works.

However if I just call:

localhost/ci/index.php or localhost/ci/

I'll have the error message saying

Unable to determine what should be displayed. A default route has not been specified in the routing file.

in my routes.php

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

Please advise
Reply
#2

May I ask why it would make displaying images easier?

When I first read your question, I thought setting the default controller to '?c=welcome' would work but it won't because you will still have the / added.

Perhaps you need a .htaccess file (if on apache) to redirect a root call through to your c=welcome page. That might do it.

Hope that helps,

Paul.
Reply
Reply




Theme © iAndrew 2016 - Forum software by © MyBB