N
N
NoName_02017-01-05 14:38:45
PHP
NoName_0, 2017-01-05 14:38:45

Nginx php script loopback?

Hello, please tell me why a cyclic redirect occurs and how to fix it.
I need nginx to redirect all requests of the form bla.com/foo/bar to bla.com/index.php/foo/bar, that is, foo and bar become, as it were, get parameters for index.php, this is necessary in order to later implement a front controller , at the same time, it is necessary that index.php is not displayed in the address bar, but it just looks like bla.com/foo/bar Tell me
what is wrong in my config and why such a cyclic redirect occurs here is a
BHwoGuS.png
screen of my "config"
f130046663604201b07137ebd56ab1d1.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
padlyuck, 2017-01-05
@NoName_0

Try replacing your "location / {...}" section with this

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

https://github.com/samdark/yiiframework-ru/blob/ma... see here how to set up

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question