How to make ASP.NET MVC links written in different alphabets

I have an ASP.NET MVC application and I want to make links written in Cyrillic in the application. What are the possible pitfalls from an evolving perspective?

More precisely: now the link looks like this:
    http://mysite.ru/books
and I want to do this:
    http://mysite.ru/books
or even even:
    http: //mysite.ru/books

The following question can be used for both URLs, and this will be the attitude of Google and other search engines.

EDIT: Well, I would not ask if this is possible check this http://www.codeisart.ru/%D0%A0%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0 % B5-% D0% B1% D1% 83% D0% BA% D0% B2% D1% 8B-% D0% B2-url-google-% D0% B8-yandex / Yes, it looks strange, but in the browser URL The address is written in Russian. At least on my pc.

+3
source share
1 answer

According to the W3C , non-ASCII URIs must be escaped in the style of% D1% 81. I looked at the uri.wikipedia.org html sources and all uri escaped, but there is a function of some of the new browsers to convert this escaped uri to UTF8, and they sometimes appear like ordinary Cyril. Possible function.

MVC, {languageCode}/{controller}/{action}/{id} - http://servername.com/ru/articles/show/1, ...

  public ActionResult Show(String id) 

... normal utf8 id param.

http://./: -)

+3

Source: https://habr.com/ru/post/1714604/


All Articles