Welcome Guest, Not a member yet? Register   Sign In
How to use non-latin characters in slug?

The posts table contains a record where slug field is: пролпрол-про-апрарр

I try to get the post using controller:

Quote:public function view($slug = NULL){

    $data['post'] = $this->post_model->get_posts($slug);


A link to view this post in browser


but note, when I copied it to paste it here it is:


For some reason in browser I get

Quote:404 Page Not Found

How can I fix that to use a non-latin slug?

I have changed permitted_uri_chars to be

[size=small][i]a-z 0-9~%.:_-абвгдеёжзийклмнопрстуфхцчшщъыьэюя[/i][/size]

but it seems nothing changed.

See: PHP.NET urlencode and url decode.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(This post was last modified: 07-03-2018, 12:07 PM by Serializable.)

(07-03-2018, 04:42 AM)InsiteFX Wrote: See: PHP.NET urlencode and url decode.

I used a slightly diiferent solution by transliterating incoming slug. This way database records looks more consciously istead of something   incomprehensible like %D1%82%D0%B5%D0%BA%D1%81%D1%82

Theme © iAndrew 2016 - Forum software by © MyBB