Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Multiple Virtual Hosts and /web/guest
Hello Liferay-Community,
I managed to prevent /web/guest in the URL for Guests on my Liferay-Site by setting up the Virtual Host to the Domain of my site.
Sadly this is only working with or without the www Subdomain.
Virtual Host: www example com -- /web/guest will not be shown for visitors of my site using www example com
Virtual Host: example com -- /web/guest will not be shown for visitors of my site using example com
Is there a way to hide /web/guest for both options?
Cheers,
Fredi
I managed to prevent /web/guest in the URL for Guests on my Liferay-Site by setting up the Virtual Host to the Domain of my site.
Sadly this is only working with or without the www Subdomain.
Virtual Host: www example com -- /web/guest will not be shown for visitors of my site using www example com
Virtual Host: example com -- /web/guest will not be shown for visitors of my site using example com
Is there a way to hide /web/guest for both options?
Cheers,
Fredi
The simplest solution is to add a redirect in the reverse proxy. Decide, which url you like and then redirect e.g. from www.myhost.com to myhost.com.
That way, you only need one virtual host entry. This is probably the best solution. If possible, sites should have just one url.
Other ways are more complicated. You could implement your own filter that does whatever is necessary. Or maybe you can use a Wrapper for VirtualHostLocalService that treats www.myhost.com and myhost.com the same.
Note: Liferay 7.3 allows you to set multiple virtual hosts.
That way, you only need one virtual host entry. This is probably the best solution. If possible, sites should have just one url.
Other ways are more complicated. You could implement your own filter that does whatever is necessary. Or maybe you can use a Wrapper for VirtualHostLocalService that treats www.myhost.com and myhost.com the same.
Note: Liferay 7.3 allows you to set multiple virtual hosts.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™