Chuck,

Thanks.  This worked after I placed the <rewrite-dispatch> tag outside 
of the <host> block.  I couldn't get it to work inside the <host> tag.

I also discovered that I could only have one <rewrite-dispatch> tag 
under <server>, but I could put multiple <moved-permanently> tags under 
<rewrite-dispatch> .  I think this may be a bug because I have been able 
to put multiple <rewrite-dispatch> tags in resin-web.xml.

Thanks for the help.

Keith

Chuck Replogle wrote:
> Try
> 
> <rewrite-dispatch>
>    <moved-permanently regexp='^http://host.com'
> target='http://www.host.com'/>
> </rewrite-dispatch>
> 
> <rewrite-dispatch>
>    <moved-permanently regexp='^https://www1.host.com'
> target='https://www.host.com'/>
> </rewrite-dispatch>
> 
> Resin will copy the tail of the URL for you.
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Keith Fetterman
> Sent: Thursday, August 23, 2007 03:21
> To: resin-interest@caucho.com
> Subject: [Resin-interest] How do you rewrite the server name in 3.0.24
> 
> Hi,
> 
> I need to redirect URLs that contain host name aliases to our Web server
> host name.  I see the resin.conf directive:
> 
> <rewrite-dispatch>
>    <moved-permanently regexp='^/foo' target='/bar'/> </rewrite-dispatch>
> 
> But I can't figure out how to apply it to rewriting the host name.
> 
> For example.  Our host hame is "www.host.com".  If someone uses one of the
> following URLs to visit our site, we need a 301 redirect to the same URL
> with the host name replaced.  For example:
> 
> http://host.com/        => http://www.host.com/
> 
> or
> 
> https://www1.host.com/sercure/index.jsp  =>
>                       https://www.host.com/sercure/index.jsp
> 
> thanks for the help.
> 
> Keith
> 
> 
> 
> 
> --
> -----------------------------------------------------------------
> Keith Fetterman                          206-780-5670
> Mariner Supply, Inc.                     [EMAIL PROTECTED]
> http://www.go2marine.com
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
> 
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest

-- 
-----------------------------------------------------------------
Keith Fetterman                          206-780-5670
Mariner Supply, Inc.                     [EMAIL PROTECTED]
http://www.go2marine.com


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to