Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Arnd Kohlen
[RESOLVED] Remove "/web/guest" from url
February 4, 2008 5:36 AM
Answer

Arnd Kohlen

Rank: New Member

Posts: 5

Join Date: December 20, 2007

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
RE: Remove "/web/guest" from url
February 1, 2008 8:52 AM
Answer

Arnd Kohlen

Rank: New Member

Posts: 5

Join Date: December 20, 2007

Recent Posts

Oops, seems like I already solved it...

  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"


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
JR Houn
RE: Remove "/web/guest" from url
February 1, 2008 9:43 AM
Answer

JR Houn

LIFERAY STAFF

Rank: Expert

Posts: 489

Join Date: November 19, 2007

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
Wade MacDonald
RE: Remove "/web/guest" from url
April 1, 2008 10:01 AM
Answer

Wade MacDonald

Rank: Junior Member

Posts: 40

Join Date: March 6, 2008

Recent Posts

I agree... post away and solve them too LOL it helps id10t guys like me emoticon
Ziggy ©
RE: Remove "/web/guest" from url
July 2, 2009 11:01 AM
Answer

Ziggy ©

Rank: Expert

Posts: 293

Join Date: June 8, 2008

Recent Posts

Yupp here is another idi0t that found this thread usefull emoticon
Anthony Cinelli
RE: [RESOLVED] Remove "/web/guest" from url
July 31, 2009 5:13 PM
Answer

Anthony Cinelli

Rank: New Member

Posts: 2

Join Date: July 31, 2009

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
RE: [RESOLVED] Remove "/web/guest" from url
August 7, 2009 2:20 PM
Answer

Tony Portalco

Rank: New Member

Posts: 1

Join Date: August 7, 2009

Recent Posts

This is an important requirement for SEO. Any thoughts on how to achieve this would be most appreciated.
Ziggy ©
RE: [RESOLVED] Remove "/web/guest" from url
August 7, 2009 3:05 PM
Answer

Ziggy ©

Rank: Expert

Posts: 293

Join Date: June 8, 2008

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)
Jerry Niu
RE: [RESOLVED] Remove "/web/guest" from url
August 8, 2009 8:14 AM
Answer

Jerry Niu

LIFERAY STAFF

Rank: Expert

Posts: 451

Join Date: June 21, 2006

Recent Posts

Ziggy ©
RE: [RESOLVED] Remove "/web/guest" from url
August 7, 2009 5:05 PM
Answer

Ziggy ©

Rank: Expert

Posts: 293

Join Date: June 8, 2008

Recent Posts

Jerry Niu
RE: [RESOLVED] Remove "/web/guest" from url
August 8, 2009 8:14 AM
Answer

Jerry Niu

LIFERAY STAFF

Rank: Expert

Posts: 451

Join Date: June 21, 2006

Recent Posts

Dominik Fischer
RE: Remove "/web/guest" from url
June 27, 2010 3:48 AM
Answer

Dominik Fischer

Rank: New Member

Posts: 1

Join Date: June 27, 2010

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
RE: Remove "/web/guest" from url
July 30, 2010 5:59 AM
Answer

Priit Liivak

Rank: New Member

Posts: 13

Join Date: June 16, 2010

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
Arun Krishnan
RE: [RESOLVED] Remove "/web/guest" from url
November 29, 2010 9:44 PM
Answer

Arun Krishnan

Rank: New Member

Posts: 1

Join Date: November 29, 2010

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.
John Nguyen
RE: Remove "/web/guest" from url
September 13, 2012 11:41 AM
Answer

John Nguyen

Rank: New Member

Posts: 21

Join Date: July 16, 2012

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?
John Nguyen
RE: Remove "/web/guest" from url
September 14, 2012 8:37 AM
Answer

John Nguyen

Rank: New Member

Posts: 21

Join Date: July 16, 2012

Recent Posts

Does this help?
http://stackoverflow.com/questions/12426047/liferay-removing-web-from-all-community-sites
John Nguyen
RE: [RESOLVED] Remove "/web/guest" from url
September 20, 2012 12:30 PM
Answer

John Nguyen

Rank: New Member

Posts: 21

Join Date: July 16, 2012

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.

1ProxyHTMLExtended On
2ProxyHTMLEnable On
3SetOutputFilter INFLATE;proxy-html;DEFLATE
4ProxyHTMLURLMap ^/web/(.*)$ /$1 Rli
Johann Kneringer
RE: [RESOLVED] Remove "/web/guest" from url
December 13, 2012 3:48 AM
Answer

Johann Kneringer

Rank: Junior Member

Posts: 40

Join Date: November 10, 2011

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