P
P
prolige2021-04-05 14:37:44
Nginx
prolige, 2021-04-05 14:37:44

Redirect all requests to one .php file in nginx?

How to redirect all requests to one php file with argument in nginx config
Example: site.com/sadasd/sadasd/asd
then redirects to site.com/index.php?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Hog, 2021-04-05
@prolige

location / {
    try_files $uri /index.php?$args&url=$uri;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question