Message Boards

[RESOLVED] Remove "/web/guest" from url

Arnd Kohlen, modified 16 Years ago.

[RESOLVED] Remove "/web/guest" from url

New Member Posts: 5 Join Date: 12/20/07 Recent Posts
Our liferay is now running and now it is important to optimize the site for the search engines therefore I need to remove the part "/web/guest" from the url.

For example:
Default: http://www.domain.com/web/guest/services
Should be: http://www.domain.com/services

I was searching for some configuration possibilities but only found a suggestion to use "mod_proxy_html". This module is able to change the url and the links inside the html-code.

Is there a better way to remove "/web/guest"? I'd like to know if there is an option in liferay (communities, virtual hosts...) to solve this. I just need a yes/no to know if I still have to search for some hacks in the configuration.

Thank you in advance.
Arnd
Arnd Kohlen, modified 16 Years ago.

RE: Remove "/web/guest" from url

New Member Posts: 5 Join Date: 12/20/07 Recent Posts
Oops, seems like I already solved it...

  • I created a community www.domain.com
  • I created a few public pages and entered the friendly url for them
  • For the community I entered www.domain.com as virtual host for the "Public Virtual Host"


This seems to work. There is still access over "/web/guest/pagename" possible but default targets now to /pagename.

Sorry for spamming your forums emoticon
thumbnail
JR Houn, modified 16 Years ago.

RE: Remove "/web/guest" from url

Expert Posts: 488 Join Date: 11/19/07 Recent Posts
Hi Arnd-
Glad you solved your problem! Don't worry about 'spamming' our forums, for every question that's asked on these forums there's probably 100 other people wondering how to do the exact same thing. Thanks for posting your question and your solution! Please add a "(RESOLVED)" tag to the subject header of your post. Oh and would you kindly consider adding your question and answer to the Liferay Wiki FAQ page? http://wiki.liferay.com/index.php/FAQ
Thanks
-jr
thumbnail
Wade MacDonald, modified 16 Years ago.

RE: Remove "/web/guest" from url

Junior Member Posts: 40 Join Date: 3/6/08 Recent Posts
I agree... post away and solve them too LOL it helps id10t guys like me emoticon
thumbnail
Ziggy R, modified 14 Years ago.

RE: Remove "/web/guest" from url

Expert Posts: 293 Join Date: 6/8/08 Recent Posts
Yupp here is another idi0t that found this thread usefull emoticon
Dominik Fischer, modified 13 Years ago.

RE: Remove "/web/guest" from url

New Member Post: 1 Join Date: 6/27/10 Recent Posts
Hey there,

I did exactly the same:

1. I created a community www.domain.com
2. I created a few public pages and entered the friendly url for them
3. For the community I entered www.domain.com as virtual host for the "Public Virtual Host"

Now I can reach my community via the virtual host url www.domain.com. emoticon

Nevertheless the logo on the top left still points to www.domain.com/web/guest which directs to a different community with different content?

There should be no link to an other community.
Is there a way to get rid of that web/guest community link? Is it needed from architectural grounds?


Best regards,
Dominik
Priit Liivak, modified 13 Years ago.

RE: Remove "/web/guest" from url

New Member Posts: 13 Join Date: 6/16/10 Recent Posts
Dominik Fischer:


Nevertheless the logo on the top left still points to www.domain.com/web/guest which directs to a different community with different content?

There should be no link to an other community.
Is there a way to get rid of that web/guest community link? Is it needed from architectural grounds?


Best regards,
Dominik


From control panel under Portal -> Settings set the value for home url. For example /services and logo will point to www.domain.com/services
Anthony Cinelli, modified 14 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

New Member Posts: 2 Join Date: 8/1/09 Recent Posts
Hi all,
This works well, however DOES NOT work with the new Liferay 5.2 feature of "Portal IInstances". I have created multiple portal instances, www.example.com , and cannot use this as a Virtual Host value using the method you describe here.

Any input?

Thanks for all the work you guys are doing, contributing.

Anthony
Tony Portalco, modified 14 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

New Member Post: 1 Join Date: 8/7/09 Recent Posts
This is an important requirement for SEO. Any thoughts on how to achieve this would be most appreciated.
thumbnail
Ziggy R, modified 14 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

Expert Posts: 293 Join Date: 6/8/08 Recent Posts
Tony Portalco:
This is an important requirement for SEO. Any thoughts on how to achieve this would be most appreciated.


http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Virtual+Hosting+(Communities)
Arun Krishnan, modified 13 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

New Member Post: 1 Join Date: 11/30/10 Recent Posts
I have a query related to this post, How can I use the same virtual host to remove "/web" for multiple communities?

eg : my website is www.abc.com and communities are comm1, comm2 , comm3 ... comm10. I want all communities urls to be prefixed with www.abc.com but no '/web' in it.

I am using lifeary portal version 5.1. Please let me know your suggestions.
thumbnail
John Nguyen, modified 11 Years ago.

RE: Remove "/web/guest" from url

New Member Posts: 21 Join Date: 7/16/12 Recent Posts
Arun Krishnan:
I have a query related to this post, How can I use the same virtual host to remove "/web" for multiple communities?

eg : my website is www.abc.com and communities are comm1, comm2 , comm3 ... comm10. I want all communities urls to be prefixed with www.abc.com but no '/web' in it.

I am using lifeary portal version 5.1. Please let me know your suggestions.



Did you ever get this resolved?
thumbnail
John Nguyen, modified 11 Years ago.

RE: Remove "/web/guest" from url

New Member Posts: 21 Join Date: 7/16/12 Recent Posts
Does this help?
http://stackoverflow.com/questions/12426047/liferay-removing-web-from-all-community-sites
thumbnail
John Nguyen, modified 11 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

New Member Posts: 21 Join Date: 7/16/12 Recent Posts
Arnd Kohlen:
Our liferay is now running and now it is important to optimize the site for the search engines therefore I need to remove the part "/web/guest" from the url.

For example:
Default: http://www.domain.com/web/guest/services
Should be: http://www.domain.com/services

I was searching for some configuration possibilities but only found a suggestion to use "mod_proxy_html". This module is able to change the url and the links inside the html-code.

Is there a better way to remove "/web/guest"? I'd like to know if there is an option in liferay (communities, virtual hosts...) to solve this. I just need a yes/no to know if I still have to search for some hacks in the configuration.

Thank you in advance.
Arnd


Basically we took the same route and was successful so far. However, be aware that with this global redirection, it could break some of the pages on the main site if the friendly url matches that of the community site name.

ProxyHTMLExtended On
ProxyHTMLEnable On
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLURLMap ^/web/(.*)$ /$1 Rli
thumbnail
Johann Kneringer, modified 11 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

Junior Member Posts: 42 Join Date: 11/10/11 Recent Posts
Unfortunatly, this does not work...I am using the following configuration:

<VirtualHost *:443>
DocumentRoot /var/www

SSLProxyEngine On
ServerName fhonlinetest.fh-kufstein.ac.at
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem

<Proxy *>
Order deny,allow
Allow from all
</Proxy>


ProxyHTMLLogVerbose On
LogLevel Debug

ProxyHTMLDocType "<!DOCTYPE html>"

ProxyRequests Off

ProxyPass / ajp://localhost:8009/
<Location />
ProxyHTMLExtended On
ProxyHTMLInterp On
ProxyPassReverse /
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLURLMap ^/web/(.*)$ /$1 Rli
</Location>

I use ProxyHTMLInterp On instead of ProxyHTMLEnable On because i use mod_jk 3.0.1.

On the error.log I get the following message:
"No content-type; bailing out of proxy-html filter, referer: https://mysub.domain.com/web/mysite"

Doctype and meta-info:


<!DOCTYPE html><html class="ltr" dir="ltr" lang="de-DE"><head><meta http-equiv="X-UA-Compatible" content="IE=7"><title>My Site</title><meta content="text/html; charset=UTF-8" http-equiv="content-type">

is there a solution for this?

best regards
thumbnail
John Arguedas, modified 7 Years ago.

RE: [RESOLVED] Remove "/web/guest" from url

New Member Posts: 5 Join Date: 8/30/16 Recent Posts
Solution on liferay 7?