rewrite to www EXCEPT for one directory
Valentin V. Bartenev
ne at vbart.ru
Thu Sep 6 21:34:33 UTC 2012
On Friday 07 September 2012 00:32:48 eddy at sdf.org wrote:
[...]
> I suggest to use $scheme like in:
>
> rewrite ^(.*) $scheme://www.example.org/$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
possible.
wbr, Valentin V. Bartenev
--
http://nginx.org/en/donation.html
http://nginx.com/support.html
More information about the nginx
mailing list