-1

I'm trying to figure how to setup try_files to use with my php url redirection script.

The php script work this way:

mydomain.com/test

Where test is an alias which must be treated as the follow:

location / {
    try_files $uri = /redirect.php?alias=$request_uri;
}

It is working fine here, test is sent to redirect.php which treats the alias parameter.

But I'm having problem to browse to subfolders as for example mydomain.com/stats/ -- it does not works.

Any help will be appreciated!

Thank you in advance!

1 Answer 1

0

You should add some location:

location /stats {
  alias /directory/where/stats;
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .