V
V
Vladimir Revyakin2016-09-26 11:45:07
Nginx
Vladimir Revyakin, 2016-09-26 11:45:07

Redirect from HTTPS to HTTP?

In the site config, a redirect from site.com (HTTP) is redirected to (HTTPS) using
if ($scheme = http) {
return 301 https://$host$request_uri;
}
for the site7.com site, you need to do the opposite, that is, whatever the redirect to HTTPS does not go, whatever it is to HTTP, now it redirects to HTTPS.
Is it possible to change something in the condition so that site.com would remain on HTTPS and site7.com would be on HTTP?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fixid, 2016-09-26
@jonimuesli

Make a separate server {} for site7.com

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question