Francis Daly francis at
Tue Apr 5 22:48:21 UTC 2016

On Tue, Apr 05, 2016 at 08:11:44PM +0900, tseveendorj wrote:

Hi there,

> request URL is
> It should be
> I tried
> location / {
>                 rewrite ^/([^/][a-zA-Z0-9]+)$ /index.php?download=$1 break;

I'm not sure that the four characters "[^/]" are doing anything useful
on that line.

I am sure that "break" is not what you want there. Just remove it.

>                 try_files $uri $uri/ /index.php?download=$uri;
>         }
> but it is downloading index.php file itself :D

Presumably somewhere else in your config you tell nginx how to handle

Francis Daly        francis at

More information about the nginx mailing list