title: Redirect to HTTPS, if the path is NOT - NGINX
body: <p>I have this <code>NGINX</code> config to redirect to <code>https</code>:</p>
  <pre><code>server {
      listen 80;
  
      if ($host = domain.com) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
      server_name domain.com;
      root /.....;
      index index.php;
  
      location / {
                try_files $uri $uri/ /index.php?$query_string;
      }
  
      location ~ \.php$ {
          include snippets/fastcgi-php.conf;
          fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
       }
  
  </code></pre>
  <p>, and it works, if I access <code>domain.com</code> with <code>http</code>, it redirects to <code>https</code>, but I have a specific route/path, which I don't want to redirects and just stay to <code>http</code>.</p>
  <p>For the example, redirects everything to <code>https</code>, but NOT <code>domain.com./http-path</code>.</p>
  <p>How can I do that ?</p>