Nginx rewrite infinite loop
Edho Arief
edho at myconan.net
Fri Jul 29 06:05:36 UTC 2011
On Fri, Jul 29, 2011 at 11:33 AM, Steve Zhuo <lists at ruby-forum.com> wrote:
> Hi.
>
> I tried to rewrite all non-www url to www url, but when i tried to
> access the site, i got the infinite loop. following is my config
>
> server {
> server_name www.example.com;
>
> }
> location / {
> ......
>
> rewrite ^ http://example.com$request_uri? permanent;
> proxy_pass http://example.com
do you want to proxy or rewrite? R
Also why do people like posting snippet of their config file? This one
isn't even a valid one with location block outside sever block.
More information about the nginx
mailing list