I have set up my server with the following settings:
server {
server_name www.example.com
listen 443;
listen 80;
location /login\.php
{
rewrite ^(.*) https://www.example.com/login.php$1 last;
}
.. other settings
}
However, with this setup I receive a redirect error (too many redirects). Is there a way to tell nginx that if I have the file login.php that I want SSL and all other files are being served without it?