$_GET variables passed to controller as lowercase - 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: $_GET variables passed to controller as lowercase (/showthread.php?tid=2629) |
$_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]zapada[/eluser] If i go to site.com/controller/function/StRiNg, the paramater is fetched as lowercase. Is there any way to have it fetched without making it lowercase? Thanks. $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]garymardell[/eluser] Want the short answer or the long? Short answer is no Long answer is nope Urls cant contain capitals. Try it typing in www.CodeIgniter.com it will just go to lowercase. $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]coolfactor[/eluser] Uppercase and Lowercase works fine, but you're probably running into 1 of 2 possibilities. 1) your server is doing the rewriting - less likely 2) CodeIngiter's XSS/Validation/Security system is lower-casing the parameters - more likely $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]coolfactor[/eluser] [quote author="gazza" date="1187217835"] Urls cant contain capitals. Try it typing in www.CodeIgniter.com it will just go to lowercase.[/quote] The host name and the rest of the url are different beasts. The host name is usually lower-cased, but the rest of the url won't be. Try this link: http://CodeIgniter.Com/FoRums/viEwthRead/58679/ EDIT - wow, that link is invalid. Well, bygollygee, what the heck? I've never run into that before. I didn't know CodeIgniter cared about the case of the controller/function segments, but I guess it does. The rest of the segments should work fine as upper or lowercase, though. $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]coolfactor[/eluser] [quote author="zapada" date="1187216962"]If i go to site.com/controller/function/StRiNg, the paramater is fetched as lowercase. Is there any way to have it fetched without making it lowercase? Thanks.[/quote] By the way, this is not a $_GET variable... this is an url segment. Yes, it's a GET request, but there's no variables being passed with the request. $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]Skulls[/eluser] this problem is similar to the calling of a file from a webserver. i had lots of free hosting domains that ran under linux and had problems diplaying an image if it was called like img src=my_image.jpg and the image was named like my_image.JPG. i was messing around with image editors and didn't care about that until i was uploading the whole site :d (i was working on windows and the problem didn't appear) maybe it has something to do with the configuration of the webserver $_GET variables passed to controller as lowercase - El Forum - 08-15-2007 [eluser]coolfactor[/eluser] Correct. Windows is not case-sensitive, but Linux is. It makes sense when accessing regular files, but I didn't realize CodeIgniter cared when figuring out the Controller and Function to call, but obviously it does matter. $_GET variables passed to controller as lowercase - El Forum - 08-16-2007 [eluser]zapada[/eluser] [quote author="coolfactor" date="1187218576"]Uppercase and Lowercase works fine, but you're probably running into 1 of 2 possibilities. 1) your server is doing the rewriting - less likely 2) CodeIngiter's XSS/Validation/Security system is lower-casing the parameters - more likely[/quote] Yeah, I'm pretty sure it's #2. Is there a way to easily fix that (and still have xss/validation/security filter)? |