You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by James Reynolds <Ja...@intermountainmail.org> on 2006/02/08 18:00:10 UTC

Two URLs, One Web Site

I have an interesting problem. I've been handed two websites that are
nearly identical. The problem is my company made a copy of the first
website and "re-branded" it to provide a customized version for a
client. I'm sick of maintaining two code bases, so I've started to
construct a single site that will play both roles using CSS and message
bundles.

This solution works fine for 99% of the pages, except for a couple items
that fall outside my expertise. Your advise, or a pointer to where I
should conduct more homework would be greatly appreciated.

I need to maintain two URLs for the site, and each one should point to a
different home page.  www.companyA.com should point to a customized home
page. The other URL, www.companyB.com should point to a different
customized home page. Once inside the site, each company's users will
view the same pages (customized using CSS and message bundles) but each
company's URL must be maintained throughout the site.

Is this a function that Tomcat can perform, or do I need to broaden my
study? Thanks for your advice.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Two URLs, One Web Site

Posted by Tim Funk <fu...@joedog.org>.
If you are using apache. Using mod_rewrite is a very easy way to fix the 
doorway problem. For example:

<VirtualHost 127.0.0.1:80>
   ServerName www.companyA.com
   RewriteEngine  on
   RewriteCond %{REQUEST_URI} ^/$
   RewriteRule    .+  /companyA_index.html [L,R=302]
</VirtualHost>

<VirtualHost 127.0.0.1:80>
   ServerName www.companyB.com
   RewriteEngine  on
   RewriteCond %{REQUEST_URI} ^/$
   RewriteRule    .+  /companyB_index.html [L,R=302]
</VirtualHost>

Otherwise - use a ServletFilter to trap the incoming requests and 
redirect/forward to the alternate pages as needed.

-Tim

James Reynolds wrote:

> I have an interesting problem. I've been handed two websites that are
> nearly identical. The problem is my company made a copy of the first
> website and "re-branded" it to provide a customized version for a
> client. I'm sick of maintaining two code bases, so I've started to
> construct a single site that will play both roles using CSS and message
> bundles.
> 
> This solution works fine for 99% of the pages, except for a couple items
> that fall outside my expertise. Your advise, or a pointer to where I
> should conduct more homework would be greatly appreciated.
> 
> I need to maintain two URLs for the site, and each one should point to a
> different home page.  www.companyA.com should point to a customized home
> page. The other URL, www.companyB.com should point to a different
> customized home page. Once inside the site, each company's users will
> view the same pages (customized using CSS and message bundles) but each
> company's URL must be maintained throughout the site.
> 
> Is this a function that Tomcat can perform, or do I need to broaden my
> study? Thanks for your advice. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Two URLs, One Web Site

Posted by Kenevel <ke...@hotmail.com>.
James Reynolds wrote:
> This solution works fine for 99% of the pages, except for a couple
> items that fall outside my expertise. Your advise, or a pointer to
> where I should conduct more homework would be greatly appreciated.
> 
> I need to maintain two URLs for the site, and each one should point
> to a different home page.  www.companyA.com should point to a
> customized home page. The other URL, www.companyB.com should point to
> a different customized home page. Once inside the site, each
> company's users will view the same pages (customized using CSS and
> message bundles) but each company's URL must be maintained throughout
> the site. 
> 
> Is this a function that Tomcat can perform, or do I need to broaden my
> study? Thanks for your advice.

Hi James, 

Can you explain exactly what the 1% you need help with is? 

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org