CodeIgniter Forums
set config item 'permitted_uri_chars' individually for a specific controller ? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: set config item 'permitted_uri_chars' individually for a specific controller ? (/showthread.php?tid=9609)



set config item 'permitted_uri_chars' individually for a specific controller ? - El Forum - 07-01-2008

[eluser]mmackay[/eluser]
Hi there, I'm keen on keeping the default permitted characters globally for my CI install but on one controller I really need to allow flexibility on what characters are permitted for the URI.

Is there any way to set the item dynamically when required in the necessary controller(s) ? I tried using $this->config->set_item('permitted_uri_chars', 'xxxx'); but it had no effect.

Is it at all possible ?

Thanks.

- Mike


set config item 'permitted_uri_chars' individually for a specific controller ? - El Forum - 07-01-2008

[eluser]Pascal Kriete[/eluser]
The permitted uri characters are checked in the URI class, which is called from the router. This is executed before the controller runs, so you won't be able to change it dynamically.

If you give us a little more information someone can probably help you come up with a viable solution.