0

Currently the Codeigniter routing configuration and site_url only makes it possible to decouple the visible URL from the underlying path to controller.

$routing['my/url/'] = "my/controller/path";

However this doesn't help that much when you want to change the visible URL's themselves. If I change 'my/url', then all related site_url calls need to be replaced.

Is there any extension for CI which enabled support for naming URL patterns as well? So you decouple the visible URL structure as well, so you can use site_url('my_url_pattern_name') and change the underlying URL without affecting site_url (unless we change number/name of URL segment parameters of course).

Note: an example of this is Django's URL pattern naming: https://docs.djangoproject.com/en/1.3/topics/http/urls/#naming-url-patterns

Yan Berk
  • 14,328
  • 9
  • 55
  • 52
Botond Béres
  • 16,057
  • 2
  • 37
  • 50
  • I don't think there is such thing for CodeIgniter. That's can be a weakness – Yasser Souri Jul 04 '11 at 12:38
  • I guess there was a similar question before - http://stackoverflow.com/questions/1511091/php-url-routing-kind-of-like-django - but not related to codeigniter. – Sukumar Jul 06 '11 at 19:25

0 Answers0