Welcome Guest, Not a member yet? Register   Sign In
Help me config url
#1

[eluser]Le Bang[/eluser]
In file application/config/config.php

at line:

$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-';

character types limiter its medicine URL. At my country as well as many another countries had use another Unicode characters. string example (Xin chào tất cả các bạn)..
I have to make how to let it accept those string type.
#2

[eluser]Avatar[/eluser]
place a backtick before any added chars on to the originals that you want to be excepted, only way I could make it work
Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_-`!@=+;';//this will allow you to accept these extra chars in the url
note you may also need to modify your charset in config to that proper encoding:
Code:
$config['charset'] = "UTF-8";//change to your encoding
I would try something along those lines, Also If they don't store in DB correctly try to change these DB settings to the proper encoding:
Code:
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
//$db['default']['char_set'] = "latin1";
//$db['default']['dbcollat'] = "latin1_swedish_ci";
#3

[eluser]Le Bang[/eluser]
http://mysite.com/index.php/news/124/Tin_tức_sự_kiện

Which pose Perform the duties of it accepted without give mistake to error:

The URI you submitted has disallowed characters.

Database irrelevant this circumstance
#4

[eluser]Avatar[/eluser]
yes, you are correct about db. I will look around some for you. As I can see this to pose a problem for me later in the future with Cyrillic characters. What I think you may have to do it somehow add the hex version of these characters into the uri allowed list or extend the uri class. This is a very interesting problem.
#5

[eluser]Le Bang[/eluser]
a problem too. on URL. when get segment string type have some white space but URI library auto replace to "_" => Isn't become

A example:
build a search page. then keyword input sending type GET on URL
#6

[eluser]Le Bang[/eluser]
I see this type handling URL very beautiful, I am very liked. But think again founded it Un- Offer.
#7

[eluser]Le Bang[/eluser]
problem with decided Vietnamese. even though untowardly give very much.: D

Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_()-áàảãạăắằẳẵặâấầẩẫậéèẻẽẹêếềểễệóòỏõọơớờởỡợôốồổỗộúùủũụưứừửữựíìỉĩịýỳỷỹỵđÁÀẢÃẠĂẮẰẲẴẶÂẤẦẨẪẬÉÈẺẼẸÊẾỀỂỄỆÓÒỎÕỌƠỚỜỞỠỢÔỐỒỔỖỘÚÙỦŨỤƯỨỪỬỮỰÍÌỈĨỊÝỲỶỸỴĐ';
#8

[eluser]Berserk[/eluser]
lolz Big Grin




Theme © iAndrew 2016 - Forum software by © MyBB