Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you allow URI encoded characters in CodeIgniter URLs?

I am using CodeIgniter 1.7.1. My permitted URI characters are set as such:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_()@&\-';

When I type a address like http://website.com/index.php/controller/method/test%21, the page does not load and gives me the error:

Code igniter: An Error Was EncounteredThe URI you submitted has disallowed characters.

I don't understand. %20 (space) is allowed, but %21 (exclamation mark) is not.

like image 545
JoJo Avatar asked May 04 '12 21:05

JoJo


1 Answers

%21 parse into ! in codeigniter. So codeigniter doesn't support this please ! into permitted uri config file:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_()@&\-!';
like image 183
Syed Ahmed Avatar answered Sep 21 '22 17:09

Syed Ahmed