K
K
kbc5902017-03-09 14:02:40
Nginx
kbc590, 2017-03-09 14:02:40

Location setting in nginx. At the root is star.php how to write a rule, if there is no index.php in any other folder, then call the root start.php?

At the root there is start.php - site router
There are site links:
- /one/
- /two/
These folders do not physically exist. How to tell Njinx that if it does not find index.php in the specified folder, then run start.php, which lies at the root?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kbc590, 2017-03-09
@kbc590

It seems a simple line solved the problem:
try_files $uri $uri/ /index.php;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question