[Resin-interest] resin:MovedPermanently questions

2011-06-15 Thread Aaron Freeman
Trying this: 
http://www.caucho.com/resin-4.0/reference.xtp#resinMovedPermanently

Use case:  I need to do a 301 redirect for all links to http://blog.X/* 
to http://www.X/blog/

I found this documentation which is very similar, but does a forward:  
http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname

Two questions:

1) Does MovedPermanently do a 301?  If not, this is all moot.

2) I don't think MovedPermanently works at the cluster level -- thinking 
it may only work at the host level, making this use case not possible.  
Can someone verify that?  Any reason why it couldn't work at the cluster 
level in future releases?

Thanks,

Aaron


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


Re: [Resin-interest] resin:MovedPermanently questions

2011-06-15 Thread Scott Ferguson
On 06/15/2011 01:25 PM, Aaron Freeman wrote:
 Trying this:
 http://www.caucho.com/resin-4.0/reference.xtp#resinMovedPermanently

 Use case:  I need to do a 301 redirect for all links to http://blog.X/*
 to http://www.X/blog/

 I found this documentation which is very similar, but does a forward:
 http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname

 Two questions:

 1) Does MovedPermanently do a 301?  If not, this is all moot.

It uses HttpServletResponse.SC_MOVED_PERMANENTLY which is a 301.
 2) I don't think MovedPermanently works at the cluster level -- thinking
 it may only work at the host level, making this use case not possible.
 Can someone verify that?  Any reason why it couldn't work at the cluster
 level in future releases?

You can always use host-default to apply a rule across all virtual hosts.

URL dispatching is owned by the virtual host. The cluster level doesn't 
understand URLs, so it doesn't make sense to dispatch a URL in the 
cluster level.

-- Scott

 Thanks,

 Aaron


 ___
 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


Re: [Resin-interest] resin:MovedPermanently questions

2011-06-15 Thread Aaron Freeman
On 6/15/2011 3:30 PM, Scott Ferguson wrote:
 On 06/15/2011 01:25 PM, Aaron Freeman wrote:
 Trying this:
 http://www.caucho.com/resin-4.0/reference.xtp#resinMovedPermanently

 Use case:  I need to do a 301 redirect for all links to http://blog.X/*
 to http://www.X/blog/

 I found this documentation which is very similar, but does a forward:
 http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname

 Two questions:

 1) Does MovedPermanently do a 301?  If not, this is all moot.
 It uses HttpServletResponse.SC_MOVED_PERMANENTLY which is a 301.

Perfect.

 2) I don't think MovedPermanently works at the cluster level -- thinking
 it may only work at the host level, making this use case not possible.
 Can someone verify that?  Any reason why it couldn't work at the cluster
 level in future releases?
 You can always usehost-default  to apply a rule across all virtual hosts.

Interesting, I will give that a shot.

 URL dispatching is owned by the virtual host. The cluster level doesn't
 understand URLs, so it doesn't make sense to dispatch a URL in the
 cluster level.

Does that mean the example,

http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname, 
is fundamentally different then?  Maybe it's doing something other than 
dispatching for Forward to work by MovedPermanently to not work?  I can see 
why both wouldn't work at the cluster level and was surprised to see that 
example, actually, but just assumed that if Forward could work then 
MovedPermanently


 -- Scott

 Thanks,

 Aaron


 ___
 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





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


Re: [Resin-interest] resin:MovedPermanently questions

2011-06-15 Thread Scott Ferguson
On 06/15/2011 01:51 PM, Aaron Freeman wrote:

 URL dispatching is owned by the virtual host. The cluster level doesn't
 understand URLs, so it doesn't make sense to dispatch a URL in the
 cluster level.
 Does that mean the example,

 http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname,
  is fundamentally different then?  Maybe it's doing something other than 
 dispatching for Forward to work by MovedPermanently to not work?  I can see 
 why both wouldn't work at the cluster level and was surprised to see that 
 example, actually, but just assumed that if Forward could work then 
 MovedPermanently

Hmm. I've filed a bug report for this.

-- Scott



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


Re: [Resin-interest] resin:MovedPermanently questions

2011-06-15 Thread Aaron Freeman
On 6/15/2011 4:04 PM, Scott Ferguson wrote:
 On 06/15/2011 01:51 PM, Aaron Freeman wrote:
 URL dispatching is owned by the virtual host. The cluster level doesn't
 understand URLs, so it doesn't make sense to dispatch a URL in the
 cluster level.
 Does that mean the example,

 http://www.caucho.com/resin-4.0/admin/http-rewrite.xtp#Forwardbasedonhostname,
  is fundamentally different then?  Maybe it's doing something other than 
 dispatching for Forward to work by MovedPermanently to not work?  I can 
 see why both wouldn't work at the cluster level and was surprised to see 
 that example, actually, but just assumed that if Forward could work then 
 MovedPermanently
 Hmm. I've filed a bug report for this.
Ok in the meantime I am just going to create virtual hosts with 
MovedPermanently inside of 'em.


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