spaces in URLs converted to _ - 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: spaces in URLs converted to _ (/showthread.php?tid=7288) |
spaces in URLs converted to _ - El Forum - 06-20-2008 [eluser]sophistry[/eluser] here is the standard set of permitted uri chars: Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'; note that the only thing that this config item is used for is in the URI.php lib where it either accepts or rejects the URI and passes it on. Code: /** so, the problem isn't with the permitted chars because otherwise you would be getting a "this URI has disallowed chars" message. the problem is elsewhere. i found this little quizzical note in the Input.php lib. maybe that will help? Code: /* spaces in URLs converted to _ - El Forum - 06-21-2008 [eluser]AtlantixMedia[/eluser] thanks for the info. I would love to say it is working. however, it is still not working (I used raswurldecode() as suggested). I'm going nuts.... spaces in URLs converted to _ - El Forum - 06-21-2008 [eluser]sophistry[/eluser] i tested the code you posted, adding the plus sign to the permitted chars and i got the string with the plus sign in it - it was not changed to an underscore. CI 1.62, fresh code install. do a fresh test install and post results. if you still see chars changing from plus to underscore then something else is in the pipeline doing it. good+luck! :-) spaces in URLs converted to _ - El Forum - 06-23-2008 [eluser]AtlantixMedia[/eluser] I already upgraded to 1.62...anyway...I installed a fresh copy on another domain - same server....and now all I get is a 404 when I try to reach a test controller. I'm only able to get the welcome page.... Code: Not Found spaces in URLs converted to _ - El Forum - 06-23-2008 [eluser]AtlantixMedia[/eluser] hold on..now it works (the controller)......go figure...... I ran the same test, still, + are converted to _. I just want to make sure we are running the same test here: test.php controller Code: <?php config.php Code: $config['permitted_uri_chars'] = "+a-z 0-9~%.:_'-"; URI to test: http://www.yourdomain.com/test/query/will+this+ever+work I get will_this_ever_work. however, if I put this file in the root and run it outside of CI, it works: test.php Code: <?php please someone shed some light on this. I need to get it fixed fast. thanks spaces in URLs converted to _ - El Forum - 06-23-2008 [eluser]sophistry[/eluser] talk to your hosting provider; they might have some kind of filtering in place to change plus to underscore when it is sent as part of the URI rather than as part of a GET query. to test that idea, see what happens when you call something like this outside of CI: http://www.yourdomain.com/NOT_in_CI/will+this+ever+work/index.php spaces in URLs converted to _ - El Forum - 06-25-2008 [eluser]barbazul[/eluser] @sophistry: That's what he said he did in his last post. Have you tried using $this->uri->segment() instead of a method parameter. It should be the same but then again... the whole thing is so mysterious it might actually work spaces in URLs converted to _ - El Forum - 06-25-2008 [eluser]sophistry[/eluser] @barbazul - i asked atlantix to do two things... i'm not sure which one you are referring to. 1) check whether the URL gets to a directory with spaces in it when the dir+with+spaces+in+it is in the URI path rather than a segment at the end of it - that's clearer, right? 2) ask the hosting provider? i haven't seen any feedback posted about the hosting provider - i think they are filtering paths to change them. my $0.02. spaces in URLs converted to _ - El Forum - 06-25-2008 [eluser]barbazul[/eluser] @sophistry: LOL, I was referring to number 1 anyway, I misunderstood your suggestion. thought you were referring to something like: http://www.yourdomain.com/NOT_IN_CI/test.php?q=will+this+ever+work which he said he already tried. @AtlantixMedia: so, there you have it, you should try sophistry's suggestions and I would add the uri->segment() thingy to the list spaces in URLs converted to _ - El Forum - 07-02-2008 [eluser]AtlantixMedia[/eluser] sorry for the late reply: sophistry: I'm not sure I understand the test you are suggesting....I created a NOT_IN_CI folder outside of CI and I'm able to get to it through the url..... I recently changed hosting provider. Still, I'm experiencing the same issue. I will ask them. barbazul: I tried your suggestion regarding using segments, with no success. |