Welcome Guest, Not a member yet? Register   Sign In
Need help with CI 2.0 and cyrillic urls
#6

[eluser]0v3rth3d4wn[/eluser]
Hi! I'm having the same problem. For some reason on my previous project this worked:
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%&.:_\-абвгдежзийклмнопрстуфхцчшщьъюя';

But now on this new project I'm working it isn't. So I read about having to encode each character and tried this:
Code:
$cyrillic = array('а','б','в','г','д','е','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ь','ъ','ю','я');
function enc(&$item)
{
$item = urlencode($item);
};
array_walk($cyrillic,'enc');
$config['permitted_uri_chars'] = 'a-z 0-9~%&.:_\-'.implode('',$cyrillic);

When I echo the imploded $cyrillic array it returns the encoded chars but my routing is still not working. Am I doing this right?

I really would not want to type on every routing the urlencode function like this:
Code:
$route[urlencode('контакти')] = 'contact';


Messages In This Thread
Need help with CI 2.0 and cyrillic urls - by El Forum - 05-10-2011, 10:45 AM
Need help with CI 2.0 and cyrillic urls - by El Forum - 06-25-2012, 11:58 AM
Need help with CI 2.0 and cyrillic urls - by El Forum - 06-25-2012, 01:02 PM
Need help with CI 2.0 and cyrillic urls - by El Forum - 06-25-2012, 01:13 PM
Need help with CI 2.0 and cyrillic urls - by El Forum - 06-25-2012, 02:04 PM
Need help with CI 2.0 and cyrillic urls - by El Forum - 06-30-2012, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB