nginx v1.8.0 / redirects

B.R. reallfqq-nginx at yahoo.fr
Wed Sep 2 07:02:16 UTC 2015


I would suggest you avoid multiple redirects in the case a client connects
with http://domain, because your current setup will make the client
following this flow:
http://domain > http://www.domain > https://www.domain

This will hurt your TTFB. I suggest your first redirect should directly
point to the HTTPS scheme.
---
*B. R.*

On Wed, Sep 2, 2015 at 3:33 AM, <fsantiago at deviltracks.net> wrote:

> thanks. worked like a charm!
>
> On 2015-09-01 17:16, Francis Daly wrote:
>
>> On Tue, Sep 01, 2015 at 04:41:20PM -0400, fsantiago at deviltracks.net
>> wrote:
>>
>> Hi there,
>>
>> 1.> redirect <domain> > www.<domain>
>>>         a.) if www is already present, skip to step 2
>>>
>>> 2.> redirect http://www.<domain> request > https://......
>>>
>>
>> http://nginx.org/en/docs/http/server_names.html
>>
>> Use two server{} blocks.
>>
>> One matches only www.* and redirects to https://$host$request_uri
>>
>> The other redirects to http://www.$host$request_uri
>>
>>         f
>>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150902/faaf0169/attachment.html>


More information about the nginx mailing list