rewrite to www EXCEPT for one directory

Valentin V. Bartenev ne at
Thu Sep 6 21:34:33 UTC 2012

On Friday 07 September 2012 00:32:48 eddy at wrote:
> I suggest to use $scheme like in:
> rewrite ^(.*) $scheme://$1 permanent;
> to keep the https connection (if a client wants to use it). otherwise your
> server drops the https connection and the client will connect over http.
> i.e.: if you want to use /wp-admin only over https with
> "define('FORCE_SSL_ADMIN', true);" in /wp-config.php, it will safe you a
> lot of annoying behavior...

"listen 80;" means that this server section doesn't handle https connections.

And please do not use ugly rewrites instead of simple "return", where it's 

 wbr, Valentin V. Bartenev


More information about the nginx mailing list