Question: I was using MSOffice2010 and cscript (Windows Script Version 5.8), trying to do things as simple as:

```
  1. Open a native xlsx file 
  2. Save it as xls file (xlExcel8)

```

What I did was:

xcx.vbs
=======

' <http://msdn.microsoft.com/en-us/library/ff198017(v=office.14).aspx>

```
  Const xlExcel8 = 56

  Set wdo = CreateObject("Excel.Application")

  Set wdoc = wdo.Workbooks.Open("c:\path\to\foo.xlsx")

  wdoc.SaveAs "c:\path\to\bar.xls", xlExcel8

  wdoc.Close

  wdo.Quit

```

To run it:

> 
> cscript xcx.vbs
> 
> 
> 

Then, the script finished without any error. But I can't find `c:\path\to\bar.xls` at all. 

I'd appreciate if some one could show me a right way to go, thank you :)

Answer: 
Aha, the reason is: 

> 
> Django uses PATH\_INFO to match against urlpatterns. Nginx’s fastcgi\_params include doesn’t set that. It does set SCRIPT\_NAME. If both PATH\_INFO and SCRIPT\_NAME are set to $fastcgi\_script\_name, Django seems to get an empty path for all requests. Just set PATH\_INFO!
> 
> 
> 

See more at <http://aftnn.org/2009/jan/23/nginx-django-fastcgi/>.

So solution is just removing this line:`fastcgi_param SCRIPT_NAME $fastcgi_script_name;`  

Thank @Alasdair very mach.
This usually indicates that you have another URL pattern that matches the requested URL (probably all urls) and redirects to the login page. For example:

```
(r'^', 'agent.index.redirect'),
    ^ left out the end-of-string $

```

This would cause a redirect loop like you're experiencing. Do you have any other url patterns other than those listed in your question?