CodeIgniter Forums
how to allow special character in the url - 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: how to allow special character in the url (/showthread.php?tid=52069)



how to allow special character in the url - El Forum - 05-29-2012

[eluser]Angel Lay[/eluser]
When i use special characters, the uri submitted is not allowed error message occurs.
Code:
special characters: á,ó,é and so on

How can i solve it?

Thanks


how to allow special character in the url - El Forum - 05-29-2012

[eluser]Sanjay Sarvaiya[/eluser]
You have to change allowed URI Characters in config.php file.
add your spacial Characters here.
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';



how to allow special character in the url - El Forum - 05-29-2012

[eluser]Angel Lay[/eluser]
Yes, i have tried this one. The words like
Code:
+/;>
are okay.
But how can i change this kinds of special character
Code:
á,ó,é, and so on
?
there may be a lot of ASCII characters.



how to allow special character in the url - El Forum - 05-29-2012

[eluser]Pedro Luz[/eluser]
you shouldn't use characters with accents in urls.

try use convert_accented_characters();

take a look at http://ellislab.com/codeigniter/user-guide/helpers/text_helper.html