简体   繁体   English

N2CMS-多语言站点和SEO友好URL

[英]N2CMS - Multilanguage site and SEO friendly URLs

I have a N2 website with 2 languages: English and Serbian. 我有一个使用2种语言的N2网站:英语和塞尔维亚语。

I want English content to point to mydomain.com/en 我希望英文内容指向mydomain.com/en
and Serbian content to point to mydomain.com/sr 和塞尔维亚内容指向mydomain.com/sr

How can I do that? 我怎样才能做到这一点?

Today, URL for English start page is mydomain.com 今天,英文起始页的网址是mydomain.com
And for Serbian start page: mydomain.com/Start/Index?page=127 对于塞尔维亚起始页: mydomain.com/Start/Index?page=127 page= mydomain.com/Start/Index?page=127

All pages in my second language don't have SEO friendly URLs. 所有使用第二语言的页面都没有SEO友好的URL。

Any help would be greatly appreciated! 任何帮助将不胜感激!

You need to organize structure of your site in a following way 您需要通过以下方式来组织网站的结构

Root
     Language Intersection
           Start Page EN
           Start Page RS

Then, in web.config or config file in App_Data set StartPage to be ID of LanguageIntersection. 然后,在web.config或App_Data的配置文件中,将StartPage设置为LanguageIntersection的ID。 One of the common causes of non-friendly URLs is that only pages below site start page (as defined in web.config) have friendly URLs. 网址不友好的常见原因之一是,只有网站起始页(在web.config中定义)下方的页面才具有网址。 Hence, you must move your start page above each of language start pages. 因此,您必须将起始页移动到每个语言起始页的上方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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