This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat rediretion - Domain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat rediretion - Domain" Watch "Tomcat rediretion - Domain" New topic
Author

Tomcat rediretion - Domain

jules poit
Greenhorn

Joined: Oct 06, 2009
Posts: 9
Hello

Currently for my project I have registered 2 domain addresses on the same IP. But now, I would like to redirect one of this domain to the other one. I am using Tomcat

My two domains :
a.domain.com
b.domain.com

So when the user will enter a.domain.com, I want to see/being redirected to b.domain.com (both domain are pointing on the same webapp).
How can I do that ?

I tried with Aliases but it does not seemed to work - I probably did not configured the server.xml properly lol

Thanks for your help
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
jules poit wrote:I tried with Aliases but it does not seemed to work - I probably did not configured the server.xml properly


You are probably right, but it is hard to tell without seeing your server.xml
jules poit
Greenhorn

Joined: Oct 06, 2009
Posts: 9
Yes

The solution right know I implemented is the following, we already have a little java script routine for google analytic, so it is on every page, and what I had is just that :



it is working perfectly.

My server.xml is the following :



I removed the virtual host/alias stuff lol Any idea what I should put in the server.xml to make it work this way ?

Thanks for your help !
 
 
subject: Tomcat rediretion - Domain
 
Similar Threads
certificate for additional domain going to same site
Parked domains and JSP
single tomcat server multiple domain names
host two domains by one ip in Tomcat?
How Tomcat Works book - development question