rewrite to www EXCEPT for one directory

António P. P. Almeida appa at
Fri Sep 7 12:19:57 UTC 2012

On 7 Set 2012 02h13 CEST, edho at wrote:

> On Fri, Sep 7, 2012 at 5:51 AM,  <eddy at> wrote:
>> maybe it's a stupid question, but: if 'permanent - returns
>> permanent redirect with code 301'
>> (, then why one should use
>> 'return 301 URL' instat?
> I believe a "return 301 URL" doesn't do regexp processing compared
> to rewrite.

You generate the variable/group on the location and then you can use
it on the return statement. Very rarely is there a need to use a
rewrite IMHO. I think it has more to do with the (bad) habits that
mod_rewrite promotes. That's where we came from. 

--- appa

More information about the nginx mailing list