Liferay показывает разные URL для разных машин

Я вижу разные URL-адреса, генерируемые Liferay 6.1 GA2 на разных компьютерах, даже когда я ввожу в браузере один и тот же URL-адрес:

http://my.ip.0.202:8080/

Браузер Machine-1 генерирует:

http://my.ip.0.202:8080/en_GB/web/guest/home

Браузер Machine-2 генерирует:

http://my.ip.0.202:8080/web/guest/home

Конфигурации на обеих машинах, такие как языковые настройки, локальные настройки, настройки браузера, настройки панели управления, кажутся одинаковыми.

Может ли кто-нибудь сказать мне причину этого и как я могу заставить браузер обоих компьютеров отображать один и тот же URL-адрес, например http://my.ip.0.202:8080/web/guest/home

Спасибо


person Rasabihari Kumar    schedule 10.10.2012    source источник
comment
если вы вызываете первую машину удаленно, очищаете кеш и вызываете вторую удаленную машину, вы получаете такое же поведение?   -  person Matthias G    schedule 10.10.2012
comment
@MatthiasG Извините, но я не могу понять ваш вопрос, так как я новичок в Liferay, не могли бы вы объяснить немного больше о том, что вы хотите, чтобы я сделал. Спасибо   -  person Rasabihari Kumar    schedule 10.10.2012
comment
Вы сказали, что у вас две машины. Если вы возьмете третью машину и получите одинаковый доступ к ним обеим, получите ли вы те же результаты/URL-адреса?   -  person Matthias G    schedule 10.10.2012


Ответы (1)


Вы проверили Liferay Wiki: Настройка часовых поясов и региональных настроек.

Я не пробовал, но по словам одного моего коллеги:

На двух машинах может быть несоответствие локализации. Поэтому для одной машины "en_GB" автоматически привязывается к URL.

Проблема может быть решена путем установки свойства в portal-ext.properties

locale.prepend.friendly.url.style=0 (by default it is set to 1).

Следующее взято непосредственно из portal.properties:

#
# Set this to 0 if the locale is not automatically prepended to a URL. This
# means that each URL could potentially point to many different languages.
# For example, the URL http://localhost:8080/web/guest/home could then be
# viewed by users in many different languages.
#
# Set this to 1 if the locale is automatically prepended to a URL when the
# requested locale is not the default locale. This means that each URL
# points to just one language. For example, the URL
# http://localhost:8080/web/guest/home would point to the default language.
# The URL http://localhost:8080/zh/web/guest/home and
# http://localhost:8080/zh_CN/web/guest/home would both point to the Chinese
# language.
#
# In cases where the prepended locale is "zh" and not complete locale
# "zh_CN", then the full locale returned will be based on the order in which
# the locales appear in the property "locales". If "zh_CN" appears before
# "zh_TW", then "zh" will be a short hand for "zh_TW".
#
# The default language is set in system.properties with the properties
# "user.country" and "user.language".
#
# Set this to 2 if the locale is automatically prepended to every URL. This
# means that each URL points to just one language.
#
# Note that each language requires an entry in the property "locales" and a
# servlet mapping in web.xml for the I18n Servlet.
#
locale.prepend.friendly.url.style=1

Надеюсь это поможет.

person Prakash K    schedule 11.10.2012