Advertisement
Guest User

Untitled

a guest
Aug 31st, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.95 KB | None | 0 0
  1. <?php
  2. /**
  3. * CodeIgniter
  4. *
  5. * An open source application development framework for PHP 5.2.4 or newer
  6. *
  7. * NOTICE OF LICENSE
  8. *
  9. * Licensed under the Academic Free License version 3.0
  10. *
  11. * This source file is subject to the Academic Free License (AFL 3.0) that is
  12. * bundled with this package in the files license_afl.txt / license_afl.rst.
  13. * It is also available through the world wide web at this URL:
  14. * http://opensource.org/licenses/AFL-3.0
  15. * If you did not receive a copy of the license and are unable to obtain it
  16. * through the world wide web, please send an email to
  17. * licensing@ellislab.com so we can send you a copy immediately.
  18. *
  19. * @package CodeIgniter
  20. * @author EllisLab Dev Team
  21. * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
  22. * @license http://opensource.org/licenses/AFL-3.0 Academic Free License (AFL 3.0)
  23. * @link http://codeigniter.com
  24. * @since Version 1.0
  25. * @filesource
  26. */
  27. defined('BASEPATH') OR exit('No direct script access allowed');
  28.  
  29. /*
  30. | -------------------------------------------------------------------------
  31. | URI ROUTING
  32. | -------------------------------------------------------------------------
  33. | This file lets you re-map URI requests to specific controller functions.
  34. |
  35. | Typically there is a one-to-one relationship between a URL string
  36. | and its corresponding controller class/method. The segments in a
  37. | URL normally follow this pattern:
  38. |
  39. | example.com/class/method/id/
  40. |
  41. | In some instances, however, you may want to remap this relationship
  42. | so that a different class/function is called than the one
  43. | corresponding to the URL.
  44. |
  45. | Please see the user guide for complete details:
  46. |
  47. | http://codeigniter.com/user_guide/general/routing.html
  48. |
  49. | -------------------------------------------------------------------------
  50. | RESERVED ROUTES
  51. | -------------------------------------------------------------------------
  52. |
  53. | There are three reserved routes:
  54. |
  55. | $route['default_controller'] = 'welcome';
  56. |
  57. | This route indicates which controller class should be loaded if the
  58. | URI contains no data. In the above example, the "welcome" class
  59. | would be loaded.
  60. |
  61. | $route['404_override'] = 'errors/page_missing';
  62. |
  63. | This route will tell the Router which controller/method to use if those
  64. | provided in the URL cannot be matched to a valid route.
  65. |
  66. | $route['translate_uri_dashes'] = FALSE;
  67. |
  68. | This is not exactly a route, but allows you to automatically route
  69. | controller and method names that contain dashes. '-' isn't a valid
  70. | class or method name character, so it requires translation.
  71. | When you set this option to TRUE, it will replace ALL dashes in the
  72. | controller and method URI segments.
  73. |
  74. | Examples: my-controller/index -> my_controller/index
  75. | my-controller/my-method -> my_controller/my_method
  76. */
  77.  
  78. $route['^(pt|en|fr|de|es)/home'] = "home";
  79. $route['^(pt|en|fr|de|es)/company'] = "company";
  80. $route['^(pt|en|fr|de|es)/products'] = "products";
  81. $route['^(pt|en|fr|de|es)/products/woodscape-tools'] = "products/index/1";
  82. $route['^(pt|en|fr|de|es)/products/garden-tools'] = "products/index/2";
  83. $route['^(pt|en|fr|de|es)/products/carpenter-tools'] = "products/index/3";
  84. $route['^(pt|en|fr|de|es)/contacts'] = "contacts";
  85. $route['^(pt|en|fr|de|es)/news'] = "news";
  86. $route['^(pt|en|fr|de|es)/news/index'] = "news/index";
  87. $route['^(pt|en|fr|de|es)/news/index/(:num)'] = "news/index/$2";
  88. $route['^(pt|en|fr|de|es)/news/clipping'] = "news/clipping";
  89. $route['^(pt|en|fr|de|es)/news/clipping/(:num)'] = "news/clipping/$2";
  90.  
  91. $route['admin/general'] = 'admin/dashboard';
  92. $route['admin/logout'] = 'admin/login/logout';
  93.  
  94. $route['default_controller'] = 'home';
  95. $route['404_override'] = '';
  96. $route['translate_uri_dashes'] = FALSE;
  97.  
  98. $route['^pt$'] = $route['default_controller'];
  99. $route['^en$'] = $route['default_controller'];
  100. $route['^fr$'] = $route['default_controller'];
  101. $route['^de$'] = $route['default_controller'];
  102. $route['^es$'] = $route['default_controller'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement