简体   繁体   中英

Laravel URL route with utf-8 encoding

I have some page that have urls very similar to Wikipedia:

http://uk.wikipedia.org/wiki/Київ

The problem is that when I call laravel route() to get that url

route('myRouteName', 'Київ');

I get something like:

http://uk.wikipedia.org/wiki/%D0%9A%D0%B8%D1%97%D0%B2

That is the encoded version of that parameters.

Now does Google or any other SE see these two urls as:

http://uk.wikipedia.org/wiki/%D0%9A%D0%B8%D1%97%D0%B2
http://uk.wikipedia.org/wiki/Київ

as the same or duplicate?

Both URL-s will work in modern browsers and Google must be intelligent enough to show better SEO version. With wikipedia it shows http://uk.wikipedia.org/wiki /Київ

These links are the same for Google. Here's the explanation from Google: https://support.google.com/webmasters/answer/35653?hl=en

Below is an example of a URL that uses a non-ASCII character (ü), as well as a character that requires entity escaping (&):

http://www.example.com /ümlat.html&q=name

Below is that same URL, ISO-8859-1 encoded (for hosting on a server that uses that encoding) and URL escaped:

http://www.example.com/%FCmlat.html&q=name

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM