Jump to content

网站 开启了 英文 语言 , 如何 在sitemap里边不出现 英文的 url呢


desing

Recommended Posts

不是很能理解这种作法。但可以通过修改modules/gsitemap/gsitemap.php来实现。下面的修改,我没有测试过,不晓得能否实现。请注意备份!

找到:

if ($cms['id_lang'] != $defaultLanguage)




修改为:

if ($cms['id_lang'] != $defaultLanguage && $defaultLanguage != 1)




找到:

if ($category['id_lang'] != $defaultLanguage)




修改为:

if ($category['id_lang'] != $defaultLanguage && $defaultLanguage != 1)




找到:

if ($product['id_lang'] != $defaultLanguage)




修改为:

if ($product['id_lang'] != $defaultLanguage && $defaultLanguage !=1)




保存后,重新生成sitemap.xml。然后查看是否还有“英文的URL”。

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...