0

Possible Duplicate:
url encoded forward slashes breaking my codeigniter app

This is my controller:

class Foo extends Controller
{
   public function bar($url) {
       echo 'hello world';
   }
}

If I pass in a normal string into the bar function, I see "hello world" printed out.

http://website.com/index.php/foo/bar/argument

If I pass in a URL encoded string into the bar function, I get an error.

http://website.com/index.php/foo/bar/http%3A%2F%2Fwww.yahoo.com

.

Not Found

The requested URL /index.php/foo/bar/http://www.yahoo.com was not found on this server.

Community
  • 1
  • 1
JoJo
  • 19,587
  • 34
  • 106
  • 162

1 Answers1

0

use base64_encode() and base64_decode() to encode/decode the url, but you may need to add more character in your permitted uri config.

toopay
  • 1,635
  • 11
  • 18