CodeIgniter Forums
periods in uri goes to underscore - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: periods in uri goes to underscore (/showthread.php?tid=15474)



periods in uri goes to underscore - El Forum - 02-05-2009

[eluser]gullah[/eluser]
I'm trying to pass something such as mt.-John in my uri and the period always get translated to an underscore (_). I have periods allowed in my config. I removed the ? from my htaccess file as suggested by some other thread and still nothing.

Any ideas?


periods in uri goes to underscore - El Forum - 02-05-2009

[eluser]maesk[/eluser]
Try setting
Code:
$config['uri_protocol']    = 'REQUEST_URI';
in config.php

and check out this thread:
http://ellislab.com/forums/viewthread/75734/


periods in uri goes to underscore - El Forum - 02-05-2009

[eluser]gullah[/eluser]
Thanks, exactly what I needed.


periods in uri goes to underscore - El Forum - 03-09-2009

[eluser]sdclee[/eluser]
The answer given might not work in all cases and right now I don't have the time to find out exactly why, but on my linux box, the setting I had to use was:

$config['uri_protocol'] = "QUERY_STRING";

as the REQUEST_URI option resulted in invalid charaters error:

The URI you submitted has disallowed characters.

I suspect that is because I am not using mod_rewrite and therefore the '?' char is invalid in that configuration, eg:

$config['index_page'] = "index.php?";

a URI such as 'http://mydomain.com/foo/foo/username/lee.crampton' now works (ie the '.' is not being transformed into an underscore).