Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: redirect http to https, but exclude API

$
0
0
http {
map $request_uri $requri {
default 1;
/well-known 0;
}
……………………
server {
listen 80;
server_name www.mydomain.eu;
root '/webroot/www.mydomain.eu’;
if ($requri) { return 301 https://www.mydomain.eu$request_uri; }
location / {
try_files $uri $uri/ =404;
index index.html index.htm;
}
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles