Reputation: 808
I know there is many post on this tropic, but my problem is different. So please don't vote for close this issue.
To allow unicode character in URL I set null in permitted_uri_chars like below
$config['permitted_uri_chars'] = '';
As a result I can pass unicode (Bangali) to URL, but the problem when I send a specific word its show me the below error,
URL : controller/method/অনুষ্ঠান (I am getting error for this word)
But the error text should be
"The URI you submitted has disallowed characters", So I am conduced where the problem actually. Thanks in advance.
Upvotes: 0
Views: 1084
Reputation: 2122
This is not a problem of CodeIgniter but your .htaccess rewrite rule.
If you want to accept any language for pretty urls open the .htaccess file in your root folder where you have your CI index.php (e.g. public_html) and look for the rewrite rule that contains 'index.php'. Then change the regex to ^([^.]+)/?$
E.g.
RewriteRule ^([^\.]+)/?$ index.php?/$1 [L]
Cheers!
Upvotes: 2
Reputation: 51
Keep your $config['permitted_uri_chars'] as defaut
ex. $config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';
to pass unicode characters just follow this simple steps:
using urlencode and urldecode you can easily pass unicode character in url, not only in codeigniter but also in other php projects.
Hope it helped. Thanks
Upvotes: 0
Reputation: 1580
you have to pass like below :-
$config[’permitted_uri_chars’] = ‘?&=a-z 0-9~%.:_-’;
Upvotes: 0