We are using the "virtual host" feature of liferay a lot.
(Control panel -> Server -> Portal instances)
Unfortunately you can just enter one single virtual host ID here. Usually the domain plus the www subdomain/prefix. (e.g. www.traumtube.de )
If a user now enters the URL without the subdomain (here: http://traumtube.de) he would not get to the intended page but to the first (default) virtual host. Reason is: Liferay doesn't match the HTTP_HOST as it doesn't match including the subdomain.
Finally I came up with a solution using Apaches mod_rewrite to achieve the desired flexibility:
Whoopie - that helped.
RewriteEngine On
RewriteOptions Inherit
RewriteCond %{HTTP_HOST} !^www\.traumtube\.de [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.traumtube.de/$1 [L,R,NE]
Hope that helps somebody with the same issues.
Cheers!
I am hunting for and i love to article a comment that "The information of one's post is awesome" Terrific work!
ReplyDelete=======================================================
Best website designing company in Kanpur
very amazing blog content with informative content in this aarticle
ReplyDelete=================
Software development company in kanpur