Fórum

Remove "/web" from publics sites, LF 6.2 GA3

thumbnail
Sergio Romero Zayas, modificado 9 Anos atrás.

Remove "/web" from publics sites, LF 6.2 GA3

Regular Member Postagens: 151 Data de Entrada: 14/04/08 Postagens Recentes
Remove "/web" from publics sites, LF 6.2 GA3

Hi friends!

I need remove "/web" from publics sites, but i can't use Apache rules.

Need I develope a workaround in the extension?
thumbnail
Krzysztof Gołębiowski, modificado 9 Anos atrás.

RE: Remove "/web" from publics sites, LF 6.2 GA3

Liferay Master Postagens: 549 Data de Entrada: 25/06/11 Postagens Recentes
Hello Sergio,
The best (and only) way to do it is to configure a Virtual Host for your site's Public Pages. Just go to Site Settings panel, type in your domain (the one that points to your Liferay) in Public Pages section and your site will be available under this domain - without /web/sitename part. If you work locally, you can add any domain to /etc/hosts (or its Windows equivalent) and it will work too.

Regards,
KG
thumbnail
Sergio Romero, modificado 9 Anos atrás.

RE: Remove "/web" from publics sites, LF 6.2 GA3

Regular Member Postagens: 151 Data de Entrada: 14/04/08 Postagens Recentes
Thanks for your reply. This solution does not solve my problem. Excuse me for not properly explain the situation.

But don't use "Liferay-default" site.

My case:

www.myDomain.com/web/site_1
www.myDomain.com/web/site_2
www.myDomain.com/web/site_3
www.myDomain.com/web/site_4

I need:

www.myDomain.com/site_1
www.myDomain.com/site_2
www.myDomain.com/site_3
www.myDomain.com/site_4

For only public pages. And I can't use Apache.
thumbnail
Krzysztof Gołębiowski, modificado 9 Anos atrás.

RE: Remove "/web" from publics sites, LF 6.2 GA3

Liferay Master Postagens: 549 Data de Entrada: 25/06/11 Postagens Recentes
Hello Sergio,
I know there is some url rewriter in Liferay (implemented using some external sofware). Its current configuration is stored in urlrewrite.xml.

However, I'm afraid that this what you want to do may be very hard to achieve (or even not possible) as the convention of /page for sites with virtual hosts and /web/sitename/page for others is one of Liferay's basic mechanisms and there are lots of thing that rely on that. If you try to make custom url rewrites, you may brake other portal functionalities. Liferay's configuration for /web and /group prefixes is generally stored in portal.properties.

You may also configure subdomains as virtual hosts which will be much simpler and works out of the box:
  • site1.myDomain.com/welcome
  • site2.myDomain.com/welcome
  • site3.myDomain.com/welcome
  • site4.myDomain.com/welcome

Regards,
KG
thumbnail
Sergio Romero, modificado 9 Anos atrás.

RE: Remove "/web" from publics sites, LF 6.2 GA3 (Resposta)

Regular Member Postagens: 151 Data de Entrada: 14/04/08 Postagens Recentes
Thanks for your reply, Krzysztof.

I think the best solution is to convince the client use "/web" of the public's sites hehehehe emoticon. But if I do not succeed, I will have to develop a plug-ext.