掲示板

Removing languages - really, totally

11年前 に Klemens Dickbauer によって更新されました。

Removing languages - really, totally

Junior Member 投稿: 29 参加年月日: 12/02/05 最新の投稿
Hi,

when I first had my personal liferay up and running google found it and started to crawl it thoroughly. Then I had the languages selection kept set to default, having links to all the languages in the reachable login portlet.
Later I narrowed languages in <./tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties > to "locales=en_US,en_GB,de_DE,sl_SI,de_AT". But well, google seems to be kind of stubborn and keeps crawling the site with all the langauges (like "GET /fr/web/[..]"). Liferay returns then sometimes a 200, sometimes a 302, googles is happy with that and keeps track of all languages in its index, leading people who stumble upon my site by chance in google to differen "languages".
I already tried to remove the not supported languages with google webmaster tools, but that does not seem to work reliably.

Is there a way that liferay returns a 404 when a not support language is used in the URL? Or did I misunderstand the underlying concept?

thanks,
klemens
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Removing languages - really, totally

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
I haven't tried this but have you tried removing the language code from the url?

Set the following in portal-ext.properties:
locale.prepend.friendly.url.style=0
11年前 に Klemens Dickbauer によって更新されました。

RE: Removing languages - really, totally

Junior Member 投稿: 29 参加年月日: 12/02/05 最新の投稿
Ahoj Hitoshi,

thanks for your help emoticon
After some doubts about that I break some possible external links I tried that out. But still Liferay happily serves URLs including the country code. But not much harm is done - I hope the google indexer will some day realize that those links are not referenced by any that and decrease their ranking till they die of some kind.

thanks again,
~klemens
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Removing languages - really, totally

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Another possible option may be to set robot.txt and disallow unused language url from being crawled.
11年前 に Klemens Dickbauer によって更新されました。

RE: Removing languages - really, totally

Junior Member 投稿: 29 参加年月日: 12/02/05 最新の投稿
Hitoshi Ozawa:
Another possible option may be to set robot.txt and disallow unused language url from being crawled.


Funny... that's what I did just this moment. You should start a metaphysical support center corporation. ;)
Thanks for the tipp!