<div>
                    <blockquote type="cite" style="border-left-style: solid; border-left-color: rgb(0, 33, 98); color: rgb(0, 33, 98); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; margin-left: 0px; padding-left: 10px; padding-right: 0px; margin-right: 0px; "><span><div><div><div>location / {</div><div>return 301 https://$host$request_uri;</div><div>}</div><div>location = /includes/api.php {</div><div>...</div><div>}</div></div></div></span></blockquote><div>The problem is that I'm on a web hosting service which allow<span class="Apple-tab-span" style="white-space:pre">        </span>s customers to edit an included config file.</div><div> So, "location /" is a duplicate :/</div><div><br></div><div>Isn't there a way to write "location [not matching] /includes/api.php {}" ?</div>
                </div>
                <div><div><br></div><div>---<br>Cordialement, Adnan RIHAN.<br>
<u>Président</u>-<u>Fondateur</u> de l'association (de loi 1901) <a href="http://www.virtual-info.info/" target="_blank"><b>Virtual-Info</b></a>, <i>hébergeur Web et Serveurs de Jeux</i>.<br>
<a href="http://rihan.fr/" target="_blank"><u>Consultant</u></a>-<u>Technicien Supérieur</u> en <i>Informatique de Gestion</i>.<br><u>Ambassadeur</u> <a href="http://lyt.me/7E" target="_blank"><b>Qt</b></a> (Projet <a href="http://rihan.fr/fr/projets/tagpg" target="_blank"><b>Tag-PG</b></a>).<u><br></u></div><div><br></div></div>
                 
                <p style="color: #A0A0A8;">Le dimanche 15 avril 2012 à 17:28, Edho Arief a écrit :</p>
                <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
                    <span><div><div><div>2012/4/15 Adnan RIHAN <<a href="mailto:adnan@rihan.fr">adnan@rihan.fr</a>>:</div><blockquote type="cite"><div><div>Hi everybody,</div><div><br></div><div>I'm using an internal proxy for one of my websites (just a PHP script which</div><div>does a curl request for a given script).</div><div><br></div><div>I've forced every non-ssl location to ssl with this:</div><div><br></div><div>rewrite ^/(.*) https://$host/$1 permanent;</div><div><br></div><div><br></div><div>The thing is that my scripts doesn't need SSL as it's internal, so I want to</div><div>force SSL except for a given location:</div><div><br></div><div>location = /includes/api.php {</div><div>}</div><div>rewrite ^/(.*) https://$host/$1 permanent;</div><div><br></div><div><br></div><div>Unfortunately, this isn't enough and queries to /includes/api.php?foo=bar</div><div>still sends me a 301 redirect.</div><div>Am I missing something ?</div></div></blockquote><div><br></div><div>location / {</div><div>  return 301 https://$host$request_uri;</div><div>}</div><div>location = /includes/api.php {</div><div>  ...</div><div>}</div><div><br></div><div>_______________________________________________</div><div>nginx mailing list</div><div><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></div><div><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></div></span>
                 
                 
                 
                 
                </blockquote>
                 
                <div>
                    <br>
                </div>