Re: why my php file in subdirectory doesn't work?

Edho Arief edho at
Fri Jan 6 10:36:25 UTC 2012

On Mon, Oct 17, 2011 at 11:19 PM, suttles <nginx-forum at> wrote:
> Update on my problem.... if the URL is typed this way
> it will not pull up the site, but
> when the URL is typed the site comes
> up immediately. How to do force nginx to put the trailing slash onto the
> subdomains?


location = /subdirectory {
  rewrite ^ $uri/?$args permanent;


try_files $uri $uri/ =404;


symlink in root instead of redefining root in location /subdirectory/


location /subdirectory {
##note that this one kind of not what you expect.
/subdirectorysomething will match this location.

O< ascii ribbon campaign - stop html mail -

More information about the nginx mailing list