CodeIgniter Forums
URI Charatcters problem - 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: URI Charatcters problem (/showthread.php?tid=25922)



URI Charatcters problem - El Forum - 12-30-2009

[eluser]daweb[/eluser]
Hi guys, just a simple question for you.

How can I make this URL readable from CI?

http://www.my-site.com/http://www.my-site.com/resize.php?size=p{:N{T&url;=}d@^W4qW!:Dc::/CK_@

An Error Was Encountered

The URI you submitted has disallowed characters.

In my config.php:
$config['enable_query_strings'] = FALSE;
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
$config['uri_protocol'] = "QUERY_STRING";

Thank you


URI Charatcters problem - El Forum - 12-31-2009

[eluser]Chad Fulton[/eluser]
Whoa! So many issues here.

1. What's the deal with putting http://www.my-site.com/ twice? Was that intended?

2. Must you use query strings? That's not the "CodeIgniter" way. If you must, there are a whole bunch of threads to help you there. (If this is what you're trying to do, what's with the &url; part? That's not an HTML entity that I know of. Are you trying to get a second GET variable in there?)

3. It looks like you're using some kind of encoding in the query string. Why are you encoding it? What's the reason for encoding it with whatever you're using (which is not url safe) instead of encoding it with urlencode() and urldecode() functions?

4. If you do really want to use query strings and not change the encoding, you'll have to enable query strings, and then add the characters you want to allow (looks like you'll need ={}&^!@/ at least, and maybe more depending upon what sort of encoding you're using).