Multiple URL Suffix (SOLVED - UPDATED for CI 1.6.0) |
[eluser]ejangi[/eluser]
I wanted to do something quite similar naruto, here's what I do. In my config/routes.php file I added this line: Code: $route['(:any)/(:any)\.(:any)'] = "$1/$2"; And then I added an "overwrite" class for the URI library. So, create a file in your "libraries" folder called MY_URI.php, with the following: Code: class MY_URI extends CI_URI { So, now in my controller methods I can do something like this: Code: if ($this->uri->format() == 'wsdl') { I hope this helps. |
Welcome Guest, Not a member yet? Register Sign In |