Greetings,

On Sat, Jul 20, 2013 at 12:36 AM, jieryn <jie...@gmail.com> wrote:
> I have multiple host names which resolve to the same
> application context, e.g. app.host1.com (host) and app.host2.com
> (alias). I have implemented this within conf/server.xml via Host and
> Alias definitions.

Just to close the loop here, I eventually did solve this with
URLRewrite filter. The documentation I was looking at was inaccurate
or maybe just mismatched against the version of the library being
used.. Alas, here is the working URLRewrite rule:

  <rule>
    <note>Domain name change from $OLDHOST1, with $OLDHOST2 Alias, to
$NEWHOST.</note>
    <condition type="server-name" operator="equal"
next="or">$OLDHOST1</condition>
    <condition type="server-name" operator="equal">$OLDHOST2</condition>
    <from>^(.*)$</from>
    <to last="true" type="permanent-redirect">http://$NEWHOST/$1</to>
  </rule>

Thanks!

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

Reply via email to