Welcome Guest, Not a member yet? Register   Sign In
Adding dynamic route at run time
#1

[eluser]Unknown[/eluser]
I am implementing URl rewriting via CI's routing feature. By default it allows to mention rules in routes.php.

Now I want to make it a generic function. The function will take url(non-SEO) url as input and pattern needs to be mapped for SEO(routed) URL and it returns the URL matches the pattern. For instance

Code:
function generte_seo_url($non_seo_url,$pattern)
  {
    return $seo_url;
  }

the issue is that I don't know when $route gets values and where do I add this method because route array always returns null if I echo it in any controller. Any help will be appreciated


Messages In This Thread
Adding dynamic route at run time - by El Forum - 10-10-2008, 05:26 AM
Adding dynamic route at run time - by El Forum - 10-10-2008, 09:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB