rewrite to www EXCEPT for one directory
António P. P. Almeida
appa at perusio.net
Fri Sep 7 12:19:57 UTC 2012
On 7 Set 2012 02h13 CEST, edho at myconan.net wrote:
> On Fri, Sep 7, 2012 at 5:51 AM, <eddy at sdf.org> wrote:
>> maybe it's a stupid question, but: if 'permanent - returns
>> permanent redirect with code 301'
>> (http://wiki.nginx.org/HttpRewriteModule), 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.
YMMV,
--- appa
More information about the nginx
mailing list