Welcome Guest, Not a member yet? Register   Sign In
Is CodeIgniter decoding my URL input? If so how do I fix it?

PLEASE NOTE: The spaces in my URL's are supposed to be percent symbols. I had to double urlencode my url just to post this, this forum doesn't support it very well.

I have a script that takes input that looks like this...

http://tracking.foobar1.com/9/1091/2115/u/http 3A 2F 2Fwww.foobar2.com 2Ftest-dir 2F

But when I do this in CI...


I get this...

Array ( [1091] => 2115 [u] => http: [www.foobar.com] => testdir )

Instead of... (because my query string is decoded)

Array ( [1091] => 2115 [u] => http://www.foobar.com/testdir/ )

I backtraced this into CodeIgniter getting $_SERVER['QUERY_STRING'] and this is what I had...
$_SERVER['QUERY_STRING'] = /9/1091/2115/u/http:/www.foobar2.com/test-dir/
Instead of...
$_SERVER['QUERY_STRING'] = /9/1091/2115/u/http 3A 2F 2Fwww.foobar2.com 2Ftest-dir 2F

And I have the CI config.php setup with...
$config['uri_protocol'] = "QUERY_STRING"; //in the config.php file (due to it replacing '.' with '_')

It was working fine, but we recently did a migration and it's gone to sh*t (not positive it was the migration though), I thought it was Apache, but now I'm wondering if it's CodeIgniter or Apache, or if anybody has any ideas why the heck it would do this?

Check $config['permitted_uri_chars'] characters in config.php and also $config['uri_protocol']. You may need to change to another value.

Theme © iAndrew 2016 - Forum software by © MyBB