Rewrite all https to http except one location

Hello,
I have a SSL config like

server {

server_name …;

do not rewrite this

location /mailadmin/(.*…php)${

some stuff

}

location / {

rewrite ^ http://$server_name$request_uri? permanent;
}

location ~ .php$ {

php stuff

}
}

URLS like
https://example.com/mailadmin/set.php?p_s=301AB1837E730B55&framework=
are partly rewrite

How can I solve this?
Regards,
Basti

Use:
return 301 http://$server_name$request_uri;
to redirect.

On Monday, February 24, 2014 04:01:03 PM basti wrote:

some stuff

php stuff


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Best regards,
Styopa S…

Sorry same result.

location /mailadmin/(...php)${
This should probably be:
location ~ /mailadmin/(.
.php)$ {

Otherwise it’s not treated as regex.

On Monday, February 24, 2014 04:01:03 PM basti wrote:

some stuff

php stuff


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Best regards,
Styopa S…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs