Yes, the line rewrite ^(.*)$ https://$servername.smartdocsonline.com/$1; could be the reason. Any other way to do this ? or Can I edit the existing rewrite rule to avoid double trailing slash ? Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261751,261758#msg-261758