On Feb 2, 2011, at 10:18 AM, Tom Atkins wrote:
> Initially I tried the short version.  Just tried the long version and it 
> works too - impressively no typos in your untested code!  Both also work 
> nicely for http and https.
> 
> What are the pros and cons of the short v long version?

The long version seems useful if you had more than one or two domains that you 
needed to redirect, and it retains the incoming http vs https scheme. Other 
than that, they should be equivalent. 

Of course, you could also implement it with regular expressions, sort of along 
the lines of the Apache rewrite module, though that seems like overkill for 
most requirements.

> 
> On 2 February 2011 17:26, Jonathan Lundell <jlund...@pobox.com> wrote:
> 
> I'm glad to here it. Did you use the short version or the long version?
> 
> If you used the short version, would you mind trying out the long version and 
> letting us know how it works? I'd like to include the technique in the 
> documentation.
> 
> BTW, this technique (or something very like it) should work fine with the 
> regex-based rewrite logic; the request.env values that we're using are 
> basically http request header items, slightly cleaned up.
> 
> 


Reply via email to