CodeIgniter Forums
Case in URI's - 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: Case in URI's (/showthread.php?tid=12059)



Case in URI's - El Forum - 10-03-2008

[eluser]codelearn[/eluser]
Hey all,

I'm trying to figure out a way to make www.zzzzz.com/XXX be the same as www.zzzzz.com/xxx. Is this a mod rewrite rule or can it be done in CI?

Thanks!


Case in URI's - El Forum - 10-03-2008

[eluser]Colin Williams[/eluser]
If you do it at the CI level, say with routes, realize that it will only take effect when CI is handling the request. If you do it at the apache level with mod_rewrite, it would take effect for everything apache is handling (although I don't think you could really do it with pure apache config because you would need something to operate on the string to make it lowercase).

To do it in CI, you might have your best luck by creating a MY_Router.php library that overloads the appropriate methods of CI_Router and converts requests to lowercase [strtolower()] before validating them.


Case in URI's - El Forum - 10-06-2008

[eluser]codelearn[/eluser]
Colin,

Thanks for the help, but I am still a bit confused.

Why would $route['XXXX']= "xxxx"; not work?