Welcome! Log In Create A New Profile

Advanced

Rewrite non-ssl to ssl except for given location

Adnan RIHAN
April 15, 2012 11:24AM
Hi everybody,

I'm using an internal proxy for one of my websites (just a PHP script which does a curl request for a given script).

I've forced every non-ssl location to ssl with this:
> rewrite ^/(.*) https://$host/$1 permanent;


The thing is that my scripts doesn't need SSL as it's internal, so I want to force SSL except for a given location:
> location = /includes/api.php {
> }
> rewrite ^/(.*) https://$host/$1 permanent;



Unfortunately, this isn't enough and queries to /includes/api.php?foo=bar still sends me a 301 redirect.
Am I missing something ?
Thanks for your help.
---
Cordialement, Adnan RIHAN.
Président-Fondateur de l'association (de loi 1901) Virtual-Info (http://www.virtual-info.info/), hébergeur Web et Serveurs de Jeux.
Consultant (http://rihan.fr/)-Technicien Supérieur en Informatique de Gestion.
Ambassadeur Qt (http://lyt.me/7E) (Projet Tag-PG (http://rihan.fr/fr/projets/tagpg)).

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 11:24AM

Re: Rewrite non-ssl to ssl except for given location

Edho Arief April 15, 2012 11:30AM

Re: Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 11:34AM

Re: Rewrite non-ssl to ssl except for given location

Jonathan Matthews April 15, 2012 11:44AM

Re: Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 12:18PM

Re: Rewrite non-ssl to ssl except for given location

Jonathan Matthews April 15, 2012 12:52PM

Re: Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 01:14PM

Re: Rewrite non-ssl to ssl except for given location

Jonathan Matthews April 15, 2012 01:22PM

Re: Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 01:24PM

Re: Rewrite non-ssl to ssl except for given location

Adnan RIHAN April 15, 2012 01:18PM

Re: Rewrite non-ssl to ssl except for given location

Edho Arief April 15, 2012 11:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready