Simple rewrite (redirection)

EricTheRed03 nginx-forum at nginx.us
Wed Nov 23 19:54:06 UTC 2011


This is the block of code I've been working on for hours ... :(

--------------- nginx.conf ------------
   server {
            listen   80;
            server_name sitea.com;
            rewrite ^(/hiddendevpath)(.*)$ http://sitea.com/ ;
            rewrite ^(.*) https://sitea.com
               }

------------- testing below ----------

sudo /usr/sbin/nginx -t
Error: nginx: [emerg] invalid number of arguments in "rewrite" directive
in /etc/nginx/nginx.conf:44

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,218893,218894#msg-218894



More information about the nginx mailing list