if ($host ~* XXXX.com) { rewrite ^/(.*)$ http://www.XXXX.com/$1 permanent; }
This is how I set it up in the nginx.conf file... Is this the wrong way to judge the statement?
You are in an endless loop. Example.com and www.example.com should be separated into two servers
server { server_name example.com; return 301 http://www.example.com$request_uri; } server { server_name www.example.com; }
You are in an endless loop.
Example.com and www.example.com should be separated into two servers