Question : How to redirect URL in tomcat

Hi,

I am using liferay (CMS) which is based on Java and runs on tomcar web server. I need to redirect all calls to www.mydomain.org into mydomain.org  (without the www) or the other way around. In apache I would do it like this:

httpd.conf vhost section or in .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain\.org
RewriteRule ^(.*)$ http://www.mydomain.org/$1 [R=permanent,L]  

I need to implement this in tomcat to ensure my google analytics will capture all hits.

Thanks,

Answer : How to redirect URL in tomcat

Random Solutions  
 
programming4us programming4us