Answer the question
In order to leave comments, you need to log in
How to forward args for the specified location in nginx?
There is an nginx config:
...
root /var/www/site.ru/
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass pool;
fastcgi_index index.php;
include fastcgi_params;
}
...
location ~ ^/test.* {
root /var/www/site.ru/public/
try_files $uri $uri/ /index.php?$args;
}
Answer the question
In order to leave comments, you need to log in
What about
location ~ ^/test(.*) {
root /var/www/site.ru/public/
try_files $uri $uri/ /index.php?$1;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question