routes.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. | -------------------------------------------------------------------------
  5. | URI ROUTING
  6. | -------------------------------------------------------------------------
  7. | This file lets you re-map URI requests to specific controller functions.
  8. |
  9. | Typically there is a one-to-one relationship between a URL string
  10. | and its corresponding controller class/method. The segments in a
  11. | URL normally follow this pattern:
  12. |
  13. | example.com/class/method/id/
  14. |
  15. | In some instances, however, you may want to remap this relationship
  16. | so that a different class/function is called than the one
  17. | corresponding to the URL.
  18. |
  19. | Please see the user guide for complete details:
  20. |
  21. | https://codeigniter.com/user_guide/general/routing.html
  22. |
  23. | -------------------------------------------------------------------------
  24. | RESERVED ROUTES
  25. | -------------------------------------------------------------------------
  26. |
  27. | There are three reserved routes:
  28. |
  29. | $route['default_controller'] = 'welcome';
  30. |
  31. | This route indicates which controller class should be loaded if the
  32. | URI contains no data. In the above example, the "welcome" class
  33. | would be loaded.
  34. |
  35. | $route['404_override'] = 'errors/page_missing';
  36. |
  37. | This route will tell the Router which controller/method to use if those
  38. | provided in the URL cannot be matched to a valid route.
  39. |
  40. | $route['translate_uri_dashes'] = FALSE;
  41. |
  42. | This is not exactly a route, but allows you to automatically route
  43. | controller and method names that contain dashes. '-' isn't a valid
  44. | class or method name character, so it requires translation.
  45. | When you set this option to TRUE, it will replace ALL dashes in the
  46. | controller and method URI segments.
  47. |
  48. | Examples: my-controller/index -> my_controller/index
  49. | my-controller/my-method -> my_controller/my_method
  50. */
  51. $route['default_controller'] = 'home';
  52. $route['404_override'] = '';
  53. $route['translate_uri_dashes'] = FALSE;