1

my codeigniter application config:

$config['enable_query_strings'] = TRUE;
$config['uri_protocol'] = 'PATH_INFO';

so I can access my application like this : index.php?c=index&m=about

but I have a controller in "application/controllers/setting/" directory , named user.php

if mod_rewrite is enabled , i can access like : index.php/setting/user/someMethod

but How do I access it like this : index.php?c=setting/user&m=someMethod the result is 404 Not Found

log file says:

ERROR - 2011-08-11 08:03:07 --> 404 Page Not Found --> settinguser

EDIT

Answer:

index.php?d=setting&c=user&m=someMethod

tereško
  • 58,060
  • 25
  • 98
  • 150
fr33m4n
  • 542
  • 2
  • 13
  • 31

1 Answers1

1

You can access them like this

index.php?d=setting&c=user&m=someMethod

You need the directory trigger if you have a sub directory. It's in your config.php file but it has the experimental comment.

$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
ace
  • 7,293
  • 3
  • 23
  • 28
  • so what if i have multi-directories like "application/controllers/setting/test/user.php" – fr33m4n Aug 11 '11 at 08:45
  • codeigniter doesn't support it, only allows one level of subdirectory for organizing controllers, http://codeigniter.com/user_guide/general/controllers.html#subfolders. – ace Aug 11 '11 at 09:06